Converting MP4 to AVi with Avidemux

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
bicky
Level 4
Level 4
Posts: 369
Joined: Mon May 25, 2009 3:50 pm
Location: Portugal

Converting MP4 to AVi with Avidemux

Post by bicky »

I have converted x264-ftp.mp4 videos to Avi ( Xvid ) using avidemux, my problem is - sound is slightly out of sync - any suggestions as to the best Audio codec to resolve this problem, at the moment I am using mp3.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Converting MP4 to AVi with Avidemux

Post by Flemur »

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.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
bicky
Level 4
Level 4
Posts: 369
Joined: Mon May 25, 2009 3:50 pm
Location: Portugal

Converting MP4 to AVi with Avidemux (SOLVED )

Post by bicky »

Simple solution - has worked perfectly for four conversions.
Install " ARISTA" Transcoder it's in the repositories - I did it via Synaptic.
Two clicks and the job is done.
Enter you file in Source, sort your Destination and Device preset I used" DivX. Home Theatre". Then Create Conversion.
Voila it works - perfect video and sound sync.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Converting MP4 to AVi with Avidemux (SOLVED )

Post by Flemur »

bicky wrote: Sun Sep 02, 2012 6:00 pmSimple solution - has worked perfectly for four conversions.
Install " ARISTA" Transcoder it's in the repositories - I did it via Synaptic.
Two clicks and the job is done.
Enter you file in Source, sort your Destination and Device preset I used" DivX. Home Theatre". Then Create Conversion.
Voila it works - perfect video and sound sync.
1 - "arista" not in the repos for Mint 18.3
2 - avidemux doesn't have any sync problems when you just convert, only when you edit - and this thread is from 2012 and the problem's been mostly or completely fixed since then.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “Sound”