View Full Version : vfr mp4 with x264... possible?
Quarkboy
14th November 2005, 10:51
I've done a bunch of web research, and as far as I can tell, creating vfr mp4 from x264 is not possible...
The only way mp4box makes vfr files is through avi's with N-vops... but you can only create those through either xvid (which doesn't work well anyway) or avi60 (which only works from mpeg2 sources.)
Making vfw mkv's, on the othre hand, is simple enough... simply create a timecode file before hand and mux with it and a raw encode of a decimated source (using tdecimate mode 4/6).
I'd prefer to encode in mp4 instead of mkv, for somewhat arbitrary reasons, am I missing something?
It would be really nice if mp4box would accept mkv style timecode files, and/or x264 itself produce vfr mp4's using an mkv timecode file itself.
bond
14th November 2005, 13:20
you are right its not possible to create vfr avc .mp4 files with any codec i know
what would be needed is either:
1) make mp4box accept the mkv-style timecode files
2) make mkvmerge be able to extract from mkv to mp4 by keeping the vfr info
3) make x264 be able to drop similar frames and output vfr mp4 itself right away
ad 1) you could make a feature request on gpac's sourceforge site, but be sure to provide lots of info on these timecode files and samples:
http://sourceforge.net/tracker/?atid=571741&group_id=84101&func=browse
ad 2) ask mosu
ad 3) ask akupenguin or motivate another x264 dev
edit: added 3) :D
Quarkboy
14th November 2005, 13:43
Okay, I posted a feature request with the gpac guys...
Actually, I spent a couple of hours peering into the mp4box/gpac framework code myself.
It doesn't seem too difficult to add in the functionality, just requires some file parsing and changing the DTS_inc for appropriate frames... although I'm not sure of the specifics, anyway.
x264 having a built-in dedup() feature would be nice, however I don't really think it should be the function of the encoder to modify the number of frames or the framerate... that's more the muxer's job. Then again, I guess x264 is also an mp4 muxer, technically, so that's not an issue.
Right now, this is (in my mind) probably the biggest disadvantage in the software based for mp4 over mkv.
bond
14th November 2005, 14:13
well it should be the codec who decides what frames to drop (leading to vfr) and what not
that is for sane source, not some 120fps whatever...
Quarkboy
14th November 2005, 14:21
well it should be the codec who decides what frames to drop (leading to vfr) and what not
that is for sane source, not some 120fps whatever...
and that insane 120 fps is exactly what I need to deal with...
When it comes to highly hybrid anime content, I'm afraid that's the norm for many raws.
But it's not too big a deal, they're just avi's with ton's of n-vops... decimating them down and making timecode files is pretty easy in avisynth. But if done inside the x264 then it'd be processing 4.5x more frames than it probably had too... hence why it's easier to decimate the types of sources I have before encoding.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.