View Full Version : ffmpeg has mkv muxing support
bond
7th September 2007, 20:21
as the title says, thanks to David Conrad (Google Summer of Code) ffmpeg can now support muxing mkv files
http://svn.mplayerhq.hu/ffmpeg/trunk/libavformat/matroskaenc.c?sortby=date&view=log
it seems it uses native mkv instead of the vfw mode
have fun ;)
Kurtnoise
7th September 2007, 20:34
yeahhh, that's great....I've already made some tests and muxing works fine.
Note that Matroska support as output in Avidemux will follow soon. ;)
bond
7th September 2007, 21:13
does the muxer write correct timestamps in native mode when writing streams with b-frames and b-pyramid?
Kurtnoise
8th September 2007, 07:47
does the muxer write correct timestamps in native mode ?
mmh...how to check this out ?
bond
8th September 2007, 13:20
mmh...how to check this out ?mkvinfo -v -v -v -v file.mkv > mkvinfo_log.txtshows the timecodes of each frame
you can compare them to the timecodes produced for the same stream in mp4 with mp4box or mp4creator (eg demux the raw stream from the mkv and merge it into mp4 with mp4box)
for mp4 you can show them via
MP4Box -dts file.mp4if you use the same fps settings (eg 25000/1000) in mp4 as ffmpeg for mkv the values should be directly comparable
alternatively you can show the timecodes also with mpeg4ip:
mp4videoinfo file.mp4 > mp4videoinfo_log.txtbtw when encoding with ffmpeg directly to mp4 the timecodes should also be correct (but not when muxing with ffmpeg to mp4)
if you want to test it you should test both seperately, b-frames and b-pyramid as they use different timecodes (b-pyramid is even more complicated)
madshi
8th September 2007, 16:54
This is probably a stupid question, but how would I practically use ffmpeg's MKV muxing solution to directly remux a h264 EVO video into MKV (running XP Professional)? I'm a total ffmpeg noob.
Do you guys know whether this ffmpeg MKV muxing can make use of the EVO timestamps? The reason I'm asking is this: If I e.g. demux the h264 track from the "Equilibrium" HD DVD and then try to remux it with mp4creator or mp4box or mkvtoolnix, the audio is totally out of sync afterwards. I'm not sure why but I guess there are video gaps in the h264 stream or something like that. Anyway, unfortunately Haali's filters can't handle HD DVD h264 movies yet, so I'm looking for another way to remux h264 EVOs to MKV without losing audio sync.
Thanks!
Kurtnoise
8th September 2007, 17:52
how would I practically use ffmpeg's MKV muxing solution to directly remux a h264 EVO video into MKV (running XP Professional)?
try this:
ffmpeg -i input.evo -vcodec copy -r 30000/1001 output.mkv
dunno if that works coz I don't have an AVC-EVO sample for testing...
madshi
8th September 2007, 18:41
Thanks. Now I just need to find a new ffmpeg win32 build somewhere........
Btw, the "Departed" trailer from here is a h264 evo sample:
http://samples.mplayerhq.hu/evob/
HD-DVD±RW
9th September 2007, 07:36
Thanks. Now I just need to find a new ffmpeg win32 build somewhere........
I was bored ... so I compiled the latest trunk and uploaded it here (http://www.filefactory.com/file/7435ef/). Version info as follows:
FFmpeg version SVN-r10438, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --cc=xgcc-3.4.5
libavutil version: 49.5.0
libavcodec version: 51.43.0
libavformat version: 51.12.2
built on Sep 9 2007 00:38:33, gcc: 3.4.5 (mingw special)
Sanity check for the parnoid..
md5 9a61d285149a55aa78427a935f894c4d ffmpeg.exe
sha1 1b76ac9626c2abb311a0a09f3471c3bdfd1b644e ffmpeg.exe
WooT! first post.
HD-DVD±RW
9th September 2007, 07:44
try this:
ffmpeg -i input.evo -vcodec copy -r 30000/1001 output.mkv
dunno if that works coz I don't have an AVC-EVO sample for testing...
no dice using the Departed Trailer.EVO file .. the output is:
ffmpeg.exe -i "Departed Trailer.EVO" -vcodec copy -r 30000/1001 "Departed Trailer.mkv"
FFmpeg version SVN-r10438, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --cc=xgcc-3.4.5
libavutil version: 49.5.0
libavcodec version: 51.43.0
libavformat version: 51.12.2
built on Sep 9 2007 00:38:33, gcc: 3.4.5 (mingw special)
Seems stream 0 codec frame rate differs from container frame rate: 1.#J (1/0) ->
90000.00 (90000/1)
Input #0, mpeg, from 'Departed Trailer.EVO':
Duration: 00:02:23.9, start: 0.287267, bitrate: 6562 kb/s
Stream #0.0[0x1e2]: Video: mpeg2video, 90000.00 fps(r)
Stream #0.1[0xc0]: Audio: 0x0000, 48000 Hz, 5:1, 448 kb/s
Output #0, matroska, to 'Departed Trailer.mkv':
Stream #0.0: Video: mpeg2video, q=2-31, 90000.00 fps(c)
Stream #0.1: Audio: mp2, 48000 Hz, 5:1, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[mp2 @ 0070CAE0]encoding 6 channel(s) is not allowed in mp2
Error while opening codec for output stream #0.1 - maybe incorrect parameters su
ch as bit_rate, rate, width or height
Kurtnoise
9th September 2007, 07:54
well...as you can see this is not an AVC video sample. :) Therefore, you have to add -an in the command line to disable audio stream copy.
btw, 90000,00 as fps. o.O That's strange...
madshi
9th September 2007, 16:31
well...as you can see this is not an AVC video sample. :)
It *IS* an AVC sample. 0x1e2 is h264/AVC. MPEG2 would be 0x1e0.
madshi
9th September 2007, 16:39
I was bored ... so I compiled the latest trunk and uploaded it here (http://www.filefactory.com/file/7435ef/).
Thank you, also for testing the trailer. Too bad h264 EVOs are not properly supported (yet).
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.