[FFmpeg-devel] [PATCH] Matroska Muxer

Reimar Döffinger Reimar.Doeffinger
Wed Sep 5 19:37:18 CEST 2007


Hello,
On Wed, Sep 05, 2007 at 01:13:30PM -0400, Alexander Strange wrote:
> On Sep 5, 2007, at 9:33 AM, Reimar D?ffinger wrote:
> > On Wed, Sep 05, 2007 at 03:15:06AM -0400, David Conrad wrote:
> > [...]
> >> As for using it, pretty much any valid command line that starts with
> >> ffmpeg and ends with .mkv should work, e.g. "ffmpeg -i blah.ogg -
> >> vcodec mpeg2video -acodec ac3 blah.mkv" It can also be used from
> >> mencoder, e.g. "mencoder blah2.avi -ovc lavc -oac faac -of lavf -o
> >> blah2.mkv" but it's possible to produce invalid files that way.
> >
> > Could you give details how and under which circumstances this produces
> > invalid files?
> 
> It creates native-order H264/MPEG4 streams for -ovc x264 and -ovc  
> xvid, but stores avi-style streams.

Well, I somehow feel this is a bit of a design problem with mkv,
requiring special handling for each supported format (though at least
the handling is much more sane than ogm and possibly more sane (but less
consistent) than for AVI).
I'm not sure there is a really good fix (beyond special cases for the
most common codecs), since mencoder is supposed to
handle e.g. binary codecs nobody ever heard of and are not in SVN - so
for these cases avi-style seems to be the only option.

> There's no extradata and all frames have increasing pts even if b- 
> frames are on. (like the big warning says, I guess)

That's exactly why I asked, because the warning is gone since quite some
time I thought...

> Also, the container DAR is set wrong; I don't see sample_aspect_ratio  
> being set anywhere in muxer_lavf.
> I'll try to send a patch for that myself.

Well, that's just a "normal", minor bug, producing invalid files is more
of a concern.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list