<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I’ve been trying to drill down the root cause of this bug for some time, and I’m very curious if any of you have seen it!</div><div class=""><br class=""></div><div class="">In muxing an H264 video file with two stereo AAC audio streams into an MP4 container, the second audio stream is of varying duration, and occasionally even out of sync with the first audio stream.</div><div class=""><br class=""></div><div class="">In blue, see the end of an MP4 with video attached, and the difference in durations of its two audio streams. In green, the same MP4 (still 2 stereo audio steams, AAC) with the video stripped (this is the audio source, right before it is attached to the video). This is in Adobe Premiere, the only way I’ve actually been able to confirm the error.</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="7DB1401B-3969-4B27-BC3E-E2EDA64CBF4F" src="cid:6A86A14A-C311-414B-B1AE-D943401E6536@corp.jauntvr.com" class=""></div><div class=""><br class=""></div><div class="">We expect some level of duration change with AAC conversion, but I am wondering why they go out of sync. Furthermore, the two streams seem in sync right up until the end—around 1:08:00, they look pretty in sync, but some point before 1:08:45, the second stream apparently drops some samples. I have frequently seen this sync off by exactly 400 milliseconds (related to a 60fps frame rate—24 frames), but not consistently—and this is a shorter clip, so that might be why. But I have not determined that the sync difference is a function of total duration.</div><div class=""><br class=""></div><div class="">Unfortunately, stripping the audio from the blue video file does not retain the error: the mono WAV files exported from Premiere (or extracted from FFmpeg) are all of identical duration and synced, as in the green waveform display. And FFprobe only reports one duration for the whole file.</div><div class=""><br class=""></div><div class="">It does cause issues in playback as the file will hang at the very end, because of the missing data in the second audio stream.</div><div class=""><br class=""></div><div class="">I’ve considered a hack to just add 0’s at the end of the second audio stream, but I would need a way to determine the duration difference programmatically. </div><div class=""><br class=""></div><div class="">Any feedback appreciated.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Gina</div><div class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">--</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Gina Collecchia</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://ginacollecchia.com" class="">http://ginacollecchia.com</a></div>
</div>
<br class=""></div></body></html>