[FFmpeg-user] Convert a series of SGI images to video

Werner Robitza werner.robitza at gmail.com
Fri Mar 1 12:31:23 CET 2013


I'm trying to create one video file out of a number of SGI images,
specifically the SVT High Definition Multi Format Test Set.

ftp://anonymous@vqeg.its.bldrdoc.gov/HDTV/SVT_MultiFormat

Each frame is an image, e.g.:

fmpeg -i 15523.sgi
ffmpeg version 1.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 24 2013 18:10:01 with Apple LLVM version 4.2
(clang-425.0.24) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.1.3 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --cc=cc --host-cflags=
--host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame
--enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libvo-aacenc --enable-libass --enable-ffplay
--enable-libschroedinger --enable-libfdk-aac --enable-libopus
--enable-frei0r --enable-libopenjpeg
--extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[image2 @ 0x7fd494028400] Stream #0: not enough frames to estimate rate;
consider increasing probesize
Input #0, image2, from '15523.sgi':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: sgi, rgb48be, 1920x1080, 25 tbr, 25 tbn, 25 tbc

How can I convert those to one, e.g., AVI file with uncompressed YUV
contents (4:2:2 or 4:2:0 is okay)?

I've been trying

cat *.sgi | ffmpeg -y -f image2pipe -c:v sgi -r 50 -i - -c:v rawvideo -f
rawvideo -pix_fmt yuv420p out.avi

But this results in:

ffmpeg version 1.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 24 2013 18:10:01 with Apple LLVM version 4.2
(clang-425.0.24) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.1.3 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --cc=cc --host-cflags=
--host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame
--enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libvo-aacenc --enable-libass --enable-ffplay
--enable-libschroedinger --enable-libfdk-aac --enable-libopus
--enable-frei0r --enable-libopenjpeg
--extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[image2pipe @ 0x7fde82032600] max_analyze_duration 5000000 reached at
5000000
[image2pipe @ 0x7fde82032600] Estimating duration from bitrate, this may be
inaccurate
Input #0, image2pipe, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: sgi, rgb48be, 1920x1080, 50 fps, 50 tbr, 50 tbn, 50
tbc
Output #0, rawvideo, to 'out.avi':
  Metadata:
    encoder         : Lavf54.59.106
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080,
q=2-31, 200 kb/s, 90k tbn, 50 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (sgi -> rawvideo)
Error while decoding stream #0:0: Invalid data found when processing input
[sgi @ 0x7fde82040e00] bad magic number
(error repeated)

Ideas? The test set is available for everyone to download. The SGI data
format is ‘sgi16’ (interleaved RGB).


More information about the ffmpeg-user mailing list