I do mp4 -> avi quite a bit with avidemux, and sound sync is a problem with some files and not others.
My two solutions are kinda bogus:
1 - convert it, then make *another* convert with "copy video" and change the sound offset until it sounds right. It'll run fast without the video re-encode.
Edit: the time often seems to be shifted by 600ms or -600ms (others have found this value, too), tho sometimes around 3500ms...you might try the +/-600ms while converting.
2 - use ffmpeg (Edit: the 'winff' GUI to ffmpeg writes some stuff to the ffmpeg command line that ffmpeg can't understand...I just delete them so it looks like the below ffmpeg command).
If you're not used to ffmpeg, it can be a PITA until you get it set up.
FWIW, here's for 480x360 files that I crop to 480x328 (takes 16 pixels off the top and bottom) - you can prolly delete that part and use the rest to start from. If the file is different than 480x360, I *think* it scales, then crops. Also, my bit rates/quality are probably lower than you want... same for the sound.
Code: Select all
#
/usr/bin/ffmpeg -i $1 \
-f avi -vcodec libxvid -vtag XVID \ # if it can't find 'libxvid', try 'libxvid' -> 'xvid' (ffmpeg versions...sigh).
-vf scale=480:360,crop=iw-0-0:ih-16-16:0:16 \ # throw this away, probably
-maxrate 450k -b 384k -qmin 7 -qmax 9 \ # change these quality settings, probably
-acodec libmp3lame -ab 64k -ac 2 \ # sound portion, probably change.
$1.avi
#
For an input file named hello.mp4, the output is hello.mp4.avi (sometimes the input is flv rather then mp4 -> hello.flv.avi). If ffpeg claims it's missing codecs (after libxvid -> xvid), install libavcodec-extra-53.