GNOME Bugzilla – Bug 704520
mp4mux audio video not sync exccept vlc player
Last modified: 2018-01-23 11:05:20 UTC
h264/aac recording muxed with mp4mux. it is in sync with mplayer,vlc.But not in sync with other video player. my pipeline is like that: ...x264enc--->h264parse-->mp4mux(video_0)--- |--->test.mp4 ...faac---->aacparse----->mp4mux(audio_0)--- the 'test.mp4' can play,but is in sync only with vlc player. I am fighting on it for several weeks,Who can help me ?
The reason could be aac encoder delay, which is currently not captured and propagated to muxer in gstreamer.
Also related https://bugzilla.gnome.org/show_bug.cgi?id=620323 The encoder delay has to be put somewhere, for me the caps still feel like the best place for that even if it's not something negotiable.
The thing here is - when there's no information about encoder delay in the file, QuickTime should assume 2112 samples. Common encoder delays are from 1024 (faac) to 2112 (core audio) samples, so even if the decoder assumes wrong it shouldn't cause significant A/V sync problems. However with some files I've noticed audio being almost 80ms before the video in quicktime (iOS device), which is a lot.
Perhaps the original reporter could clarify what he means with 'out of sync' - not perfectly synced, i.e 10s of milliseconds off, or are we talking about a/v sync being completely broken (seconds off, or drifting out of sync over time)?
(In reply to comment #4) > Perhaps the original reporter could clarify what he means with 'out of sync' - > not perfectly synced, i.e 10s of milliseconds off, or are we talking about a/v > sync being completely broken (seconds off, or drifting out of sync over time)? thank you ,it is a/v sync being completely broken (seconds off)
(In reply to comment #1) > The reason could be aac encoder delay, which is currently not captured and > propagated to muxer in gstreamer. thank you my friend ,but what can i do? it is a/v sync being completely broken (seconds off)
(In reply to comment #3) > The thing here is - when there's no information about encoder delay in the > file, QuickTime should assume 2112 samples. Common encoder delays are from 1024 > (faac) to 2112 (core audio) samples, so even if the decoder assumes wrong it > shouldn't cause significant A/V sync problems. However with some files I've > noticed audio being almost 80ms before the video in quicktime (iOS device), > which is a lot. thank you my friend ,but what can i do? it is a/v sync being completely broken (seconds off),not delay i.e 10s of milliseconds off
Seconds off means it is definitely something else, not encoder delay.
(In reply to comment #8) > Seconds off means it is definitely something else, not encoder delay. yes. but when i replace the 'mp4mux' with matroskamux and generate the 'test.mkv'. The 'test.mkv' is in sync with every all video player. The I am confused.
(In reply to comment #8) > Seconds off means it is definitely something else, not encoder delay. And I replaced 'mp4mux' with 'avimux',it is the same .'qtmux'--the 'test.mov' is just a little video delay,some millesecond. Just 'matroskamux' is in sync with all player perfectly.
Can you provide a testcase to reproduce this? What's your audio/video source?
Setting NEEDINFO, we need a test case to reproduce this.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!