View Full Version : [SOLVED] Audio delay in the MP4 container
filler56789
31st January 2013, 01:19
Well, I'd like to know whether:
1) using Edit (List) Box ( whatever it means :) ) is the ONLY way to implement an audio offset in an MP4 file :confused:
2) supporting such use of the Edit (List) Box element is a job for the MP4 splitters OR for the media players themselves.
According to various sources,
( for example, http://forum.videohelp.com/threads/345598-MP4-file-out-of-sync-in-VLC-not-in-MPC-HC?p=2209355&viewfull=1#post2209355 )
VLC would be "compliant" and MPC-HC/BE would be "not-compliant", HOWEVER it's not clear yet whether the merit is of VLC "itself", or of the MP4 demuxer(s) that VLC uses :confused:
filler56789
31st January 2013, 16:28
According to a test run some minutes ago:
ffmpeg -i video.mp4 -itsoffset 00:00:05.000 -i audio.mp4 -vcodec copy -acodec copy output.mp4
produces an MP4 whose 5-second audio delay is respected by both LAV Splitter and AV Splitter in MPC-HC :) :) :)
OTOH, Mplayer solemnly ignores the audio delay generated through ffmpeg (the switch "-demuxer lavf" makes no difference) :confused: :confused: :confused:
And if I remux output.mp4 to output2.mp4 with MP4Box, the timestamp-based audio delay is removed :mad: :mad: :mad:
Reimar
31st January 2013, 22:00
OTOH, Mplayer solemnly ignores the audio delay generated through ffmpeg (the switch "-demuxer lavf" makes no difference) :confused: :confused: :confused:
MPlayer doesn't ignore it, at least not for me.
However since MPlayer never stretches or pauses audio, it can take a lot of time for the video to catch up with where it should be.
You can see that from the large value after "A-V:" on its status line.
The way to avoid this is by adjusting the time stamps via inserting extra audio at the beginning. The problem is that this is rather difficult to do without re-encoding the audio and I don't know of any tools that would do that for you.
Simon88
1st February 2013, 08:44
you should use latest mp4box for audio delay... it is set using the "delay="... it is great and very reliable.. use vlc/mpc-hc to find +/- delay value...
certain... very old versions of ffmpeg does not set it correctly...
good luck
filler56789
1st February 2013, 10:43
@ Reimar: thanks for chiming in. :thanks:
I'm using a recent build from Redxii's repository, so I will run a test with the last build by Sherpya and check if that makes some difference.
Question 2) remains unanswered though :o ,
let's hope the VFR Maniac feels like chiming in someday. :)
@ Simon88: you didn't understand what I wrote. :p
filler56789
1st February 2013, 17:13
@ Reimar: thanks for chiming in. :thanks:
I'm using a recent build from Redxii's repository, so I will run a test with the last build by Sherpya and check if that makes some difference.
Last Mplayer by Sherpia didn't make any difference. :confused:
OTOH, the audio offset by MP4Box does work :eek: in MPC-HC Lite 1.6.5.6243, with AV Spliitter or with LAV Splitter.
So, for the time being at least, I assume the ACTUAL problem is "outside" of the up-to-date versions of MPC-HC and of the MP4 splitters as well. :)
EDIT:
This time I tested a very-recent build of MP4Splitter.ax, and yes — different from LAV Splitter, it does ignore the delay info in the "Edit Box" thing. So, until proven otherwise, the real fault is of everyone who has been relying on the internal filters of MPC-HC since the very beginning. :p
EDIT 2:
It seems Haali Media Splitter has the same design flaw as MPC-HC's MP4 Splitter:
http://forum.videohelp.com/threads/345598-MP4-file-out-of-sync-in-VLC-not-in-MPC-HC?p=2217648&viewfull=1#post2217648
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.