Log in

View Full Version : MP4 H.264 audio sync correction


Maddux
24th May 2007, 09:36
What can I use to adjust the audio sync on a 1080p H.264 in MP4 container? I don't think I can use VirtualDub/Mod for this. Am I wrong?

foxyshadis
24th May 2007, 11:01
YAMB/MP4Box can - or possibly Avidemux, but that might require re-encoding audio, not sure.

Maddux
24th May 2007, 16:20
How do I do that with YAMB? I've got 1.6 and 2.0, and I couldn't find any options to adjust a/v sync. Can I do it in mp4box CLI? What command would I use?

Kurtnoise
24th May 2007, 17:12
With Yamb 2.0, select your stream in the list and click on Properties to specify the delay.

With MP4Box :
MP4Box -add my_file.264:delay=xxx my_output.mp4
or
MP4Box -delay xxx -add my_file.264 my_output.mp4


edit: don't forget also to put the fps value for raw AVC stream.

Atak_Snajpera
24th May 2007, 22:21
Of course you can use -delay xxxx to correct audio synchronization but..... unfortunately It's ignored during playback. I checked with MPC and Haali Media Splitter :(

Kurtnoise
24th May 2007, 22:46
because it's a missing feature in the splitter.

Maddux
25th May 2007, 09:30
Upon closer inspection of my files, I discovered the sync is off by nearly 10 seconds, and it would be a freaking pain to try to sync that right. It occurred to me to check the original transport stream that I demuxed it from and noticed that mp4box dropped the whole front end of the video when I demuxed it (its a black screen with content warnings from Sky in the UK, I guess it thought that shouldn't be there).

This is a whole separate problem, but I wonder if there is an option in mp4box (or something else, ffmpeg maybe? I'm really a noob at these CLI video utilities) to prevent it dropping any frames while demuxing, because that is whats throwing my sync off. What I'm afraid of is that even if I can correct the sync on what I already have, by the end of the movie its going to be off again.

Correction: I used mencoder to demux the transport stream, not mp4box.

bond
28th May 2007, 11:55
are you sure that the video is still including all parts in the raw .264 output by mencoder?

normally all frames before the first keyframe are dropped, as they are normally not decodeable (this is a problem that can occur with broadcast captures)

moved