[FFmpeg-trac] #252(avformat:new): matroska/rawvideo decoding gives invalid pixel format string -1 @ buffer

FFmpeg trac at avcodec.org
Mon May 30 03:47:46 CEST 2011


#252: matroska/rawvideo decoding gives invalid pixel format string -1 @ buffer
---------------------------------------+---------------------
 Reporter:  kenney                     |        Type:  defect
   Status:  new                        |    Priority:  normal
Component:  avformat                   |     Version:  git
 Keywords:  matroska rawvideo pix_fmt  |  Blocked By:
 Blocking:                             |  Reproduced:  0
 Analyzed:  0                          |
---------------------------------------+---------------------
 The error:
 {{{
 [buffer @ 00000000003F8E80] Invalid pixel format string '-1'
 Error opening filters!
 }}}

 I am converting an mkv file with a V_UNCOMPRESSED or -vcodec rawvideo
 video stream to any other stream, let's say .avi.

 First create the .mkv with rawvideo using any (short) valid video file,
 such as an avi:

 $ ffmpeg -i goodfile.avi -vcodec rawvideo test.mkv
 [See output 1 below]

 Next, I convert the mkv, which doesn't play ofcourse, back to
 avi:

 $ ffmpeg -i test.mkv test.avi
 [See output 2 below]

 The first step is just for you guys to be able to test this.
 I need to be able to pipe uncompressed frames with a timecode
 to ffmpeg.exe commandline, and mkv seems one of the only formats
 that allows this, as the rest either doesn't have VFR or uncompressed
 frames. And no, I cannot use the libs.



 Here is '''output 1''', no problems here:
 {{{
 ffmpeg version git-N-30155-g01a73d6, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on May 23 2011 03:47:41 with gcc 4.5.3
   configuration: --enable-gpl --enable-version3 --enable-memalign-hack
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
 libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg
 --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-
 libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-
 libxavs --enable-libxvid --enable-zlib --pkg-config=pkg-config
   libavutil    51.  2. 1 / 51.  2. 1
   libavcodec   53.  6. 0 / 53.  6. 0
   libavformat  53.  2. 0 / 53.  2. 0
   libavdevice  53.  0. 0 / 53.  0. 0
   libavfilter   2. 10. 0 /  2. 10. 0
   libswscale    0. 14. 0 /  0. 14. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [avi @ 000000000033A0C0] non-interleaved AVI
 Input #0, avi, from 'goodfile.avi':
   Duration: 00:00:02.54, start: 0.000000, bitrate: 298619 kb/s
     Stream #0.0: Video: rawvideo, bgr24, 960x540, 24 tbr, 24 tbn, 24 tbc
 [buffer @ 000000000033CD60] w:960 h:540 pixfmt:bgr24 tb:1/1000000 sar:0/1
 sws_param:
 Output #0, matroska, to 'test.mkv':
   Metadata:
     encoder         : Lavf53.2.0
     Stream #0.0: Video: rawvideo, bgr24, 960x540, q=2-31, 200 kb/s, 1k
 tbn, 25 tbc
 Stream mapping:
   Stream #0.0 -> #0.0
 Press [q] to stop, [?] for help
 frame=   60 fps=  0 q=0.0 size=   91112kB time=2.40
 bitrate=310996.0kbits/s
 frame=   61 fps=  0 q=0.0 Lsize=   92647kB time=2.44
 bitrate=311049.8kbits/s

 video:92644kB audio:0kB global headers:0kB muxing overhead 0.003153%
 }}}

 And here is '''output 2''', the problem:
 {{{
 ffmpeg version git-N-30155-g01a73d6, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on May 23 2011 03:47:41 with gcc 4.5.3
   configuration: --enable-gpl --enable-version3 --enable-memalign-hack
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
 libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg
 --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-
 libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-
 libxavs --enable-libxvid --enable-zlib --pkg-config=pkg-config
   libavutil    51.  2. 1 / 51.  2. 1
   libavcodec   53.  6. 0 / 53.  6. 0
   libavformat  53.  2. 0 / 53.  2. 0
   libavdevice  53.  0. 0 / 53.  0. 0
   libavfilter   2. 10. 0 /  2. 10. 0
   libswscale    0. 14. 0 /  0. 14. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [matroska,webm @ 00000000003F9F20] Estimating duration from bitrate, this
 may be inaccurate
 Input #0, matroska,webm, from 'test.mkv':
   Metadata:
     ENCODER         : Lavf53.2.0
   Duration: 00:00:02.44, start: 0.000000, bitrate: N/A
     Stream #0.0: Video: rawvideo, 960x540, PAR 1:1 DAR 16:9, 25 fps, 25
 tbr, 1k tbn, 25 tbc (default)
 [buffer @ 00000000003F8E80] Invalid pixel format string '-1'
 Error opening filters!
 }}}

 Now, I realize that there is nowhere in the file stored what the pixel
 format is. Even when I specify -pix_fmt rgb24 I get this error.

 Also, according to the specs (
 http://www.matroska.org/technical/specs/index.html ) there is a
 ColourSpace field that might be used
 but is not written.

 Btw if there is a workaround to this by specifying internal filters like
 -vf buffer or something in the mean time (I tried..), I'd appreciate it;)

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/252>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list