Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Audio desync / unwanted padding with MP4Box (Read 1626 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Audio desync / unwanted padding with MP4Box

If I take a .wav file, encode it to mp4 AAC with NeroAACEnc.exe, and decode it back to .wav with NeroAACDec.exe, both the original .wav and the  final .wav have the same number of samples with the same syncronization.

If I take a .wav file, encode it to mp4 AAC with NeroAACEnc.exe, MP4Box that mp4 to a MP4Box mp4, decode it back to .wav with NeroAACDec.exe, the final.wav is ~2700 samples larger than the original; being padded with ~300 samples of silence at the end and ~2400 samples at the BEGINNING. 

This is bad becuase, i am seeing this same kind of padding for this process:
.wav -> nero encoder -> .mp4 -> mkvmerge mux (with a 264 video) -> mkvextract aac stream to .aac -> .aac to .wav
the final and beginning wav files also contain this 2700 sample de-synchronization, which is affecting the video syncronization. 

I noticed this desync when I needed to extract the aac audio from an mkv, convert to wav, swap the channels, recompress/encode, remux.  Then this offset appears to be twofold, so roughly 5200 samples which is 108ms at 48000 hz and 6.5 frames at 60fps off sync.

To replicate:
neroAacEnc -if aud.wav -of aud.mp4
MP4Box.exe -add aud.mp4 audbroken.mp4
neroAacEnc -if audbroken.mp4 -of audbroken.wav

compare aud.wav and audbroken.wav

anyone know whats up? bug? am I using the tools incorrectly? "feature"?

SimplePortal 1.0.0 RC1 © 2008-2021