Convert VQEG/SVT SGI image sequences to video
Posted: Wed Mar 06, 2013 3:29 pm
The Video Quality Experts Group (VQEG) hosts different transcoded versions reference testvideos from the Swedish Television (SVT) on their FTP server.
Excerpts of these videos are availabe there as SGI image sequences (SVT Multiformat).
I will describe here how to convert these SGI image sequences to video files, with different output colorspaces (pix_fmt), using FFmpeg.
The command base we'll be using looks like this:
Note: The words starting with a dollar-sign ($) are variables. I've kept them here, because it's easier to understand the meaning of the command - and also use it in a BASH-script directly
The variables used here are as follows:
If you want to convert the RGB SGI images to YUV with 8 bits-per-component, you can use a "yuv4mpegpipe" as output format. The following command would create an uncompressed YUV 422 planar (yuv422p) in an mpeg container:
You could also use the yuv4mpegpipe for >8 bits-per-component, but that is not standards compliant, so it might not work with all applications (ffmpeg is so nice to warn you about this).
As I haven't found a container/format combination to store uncompressed RGB in an interoperable and commonly supported way, I've used "nut" as container for the time being (although it still has issues with >8 bits-per-component):
I tried with Quicktime, AVI and Matroska, but all had different issues with handling RGB uncompressed pix_fmts...
The framemd5 checksums of the transcoded sources, including the generated output videos can be found online for the 576i25 and the 720p50 variants.
Excerpts of these videos are availabe there as SGI image sequences (SVT Multiformat).
I will describe here how to convert these SGI image sequences to video files, with different output colorspaces (pix_fmt), using FFmpeg.
The command base we'll be using looks like this:
Code: Select all
ffmpeg -f image2 -start_number $START_NUMBER -i %05d.sgi -an -f $FORMAT -vcodec $VCODEC -g 1 -pix_fmt $PIX_FMT $OUTPUT_VIDEO
The variables used here are as follows:
- $START_NUMBER: The first frame number used in the image sequence
(Example: "CrowdRun" has the first frame "03556.sgi" so it starts with "3556". "ParkJoy" is 7762, "DucksTakeOff" is 6494, and so on...) - $FORMAT: The output video format (e.g. "avi", "nut", "yuv4mpegpipe")
- $VCODEC: The output video codec (e.g. "rawvideo", "ffv1")
- $PIX_FMT: The output pixel format. This is also used to define colorspace and subsampling fo the output video.
- $OUTPUT_VIDEO: The filename of the resulting video.
If you want to convert the RGB SGI images to YUV with 8 bits-per-component, you can use a "yuv4mpegpipe" as output format. The following command would create an uncompressed YUV 422 planar (yuv422p) in an mpeg container:
Code: Select all
ffmpeg -f image2 -start_number 3556 -i 1_CrowdRun_576i25_CgrLevels_SINC_FILTER_SVTdec05_/%05d.sgi -an -f yuv4mpegpipe -vcodec rawvideo -g 1 -pix_fmt yuv422p CrowdRun_576i25-yuv422p.y4m
As I haven't found a container/format combination to store uncompressed RGB in an interoperable and commonly supported way, I've used "nut" as container for the time being (although it still has issues with >8 bits-per-component):
Code: Select all
ffmpeg -f image2 -start_number 3556 -i 1_CrowdRun_576i25_CgrLevels_SINC_FILTER_SVTdec05_/%05d.sgi -an -f nut -vcodec rawvideo -g 1 -pix_fmt rgb24 CrowdRun_576i25-yuv422p.nut
The framemd5 checksums of the transcoded sources, including the generated output videos can be found online for the 576i25 and the 720p50 variants.