Log in

View Full Version : Extracting timecodes from an mp4/h264 under linux


asbonasty
13th May 2010, 15:39
Im trying to transcode some mp4s on my linux machine. Basically I want to transcode an mp4 (h264) video into a lower bitrate for the purposes of streaming on the web. Simple eh?


The problem starts when my mp4 has a variable frame rate (VFR) and it seems there is no fully linux way (that works) of extracting the timecodes from the video stream.


I use a program called DTSEdit.exe on windows to achieve this and there isn’t a linux version knocking round on the internet.
Once I have this timecode file I then use tc2mp4.pl to convert the timecode file into NHML which mp4box can consume when creating the new mp4 (as per http://forum.doom9.org/showthread.php?t=112199 )

Ive tried using MP4Box –nhml to extract the data from the original mp4 but mp4box produces soemthing that when reimported behaves as if its a constant frame rate - i.e. doesnt work.

Does anyone have a fully linux way of extracting the timecodes from an mp4 so I don’t have to resort to using wine and doing it that way? Id really appreciate any help on this one!

Cheers,
Tom

JohnAStebbins
13th May 2010, 15:57
Maybe I'm missing something, but it seems like HandBrake and probably x264 all by itself could do a VFR mp4->mp4 transcode.

RunningSkittle
13th May 2010, 17:41
Read this commit message:
http://git.videolan.org/?p=x264.git;a=commit;h=8b9dcd8d50be201f1bedc9b19331432969f37d98

smooth_hands
29th May 2010, 03:36
Related to this:

I see that x264 now supports VFR ratecontrol. I'm wondering if this provides any benefit as opposed to my current DVD rip workflow:

rip DVD to .vob
run .vob through dgindex to get .d2v file
feed AVS script into x264.exe; AVS script looks like -> load .d2v, mpeg2 decoding/telecide/decimate, produce timecodes.txt
mux with mkvmerge; feed in timecodes.txt

Would the main difference be that I could cut out the timecodes.txt stuff and just run some additional parameters to x264.exe instead? Is there even any point in doing so?