Convert VQEG/SVT SGI image sequences to video

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1482
Joined: Fri Aug 29, 2003 8:39 pm

Convert VQEG/SVT SGI image sequences to video

Post by ^rooker »

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:

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
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:
  • $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.
I will use "CrowdRun" (576i25) in the following examples to use concrete names and numbers.

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
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):

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
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.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply