Ticket #252 (closed defect: fixed)
Muxing rawvideo in matroska is unsupported, but does not warn
| Reported by: | kenney | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | mkv rawvideo pix_fmt |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
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;)
Attachments
Change History
comment:1 Changed 2 years ago by cehoyos
- Status changed from new to open
- Version changed from git to git-master
- Reproduced by developer set
- Summary changed from matroska/rawvideo decoding gives invalid pixel format string -1 @ buffer to Muxing rawvideo in matroska is unsupported, but does not warn
Changed 2 years ago by kenney
-
attachment
test.mkv.gz
added
gives the invalid pixel format string error; gunzip first (as it is rawvideo i gzipped it)
Changed 2 years ago by kenney
-
attachment
test2.mkv.gz
added
this file is 64x64 and does not give the invalid pix fmt error but says 'cannot find codec parameters'
Changed 2 years ago by kenney
-
attachment
good.avi
added
ffmpeg -i good.avi -vcodec rawvideo test.mkv
Changed 2 years ago by kenney
-
attachment
good2.avi
added
ffmpeg -i good2.avi -vcodec rawvideo test2.mkv
comment:2 Changed 2 years ago by cehoyos
Attached patch seems necessary to me, but is unfortunately insufficient.



If you believe that FFmpeg fails to read a valid mkv rawvideo file, please upload a short sample.
(Demuxing works fine for me.)