Converting MP4 to AVi with Avidemux

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read this

Converting MP4 to AVi with Avidemux

Postby bicky on Sat Sep 01, 2012 6:48 pm

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.
User avatar
bicky
Level 4
Level 4
 
Posts: 205
Joined: Mon May 25, 2009 3:50 pm
Location: Portugal

Linux Mint is funded by ads and donations.
 

Re: Converting MP4 to AVi with Avidemux

Postby Flemur on Sun Sep 02, 2012 1:38 pm

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.
Mint 16/Xfce/fluxbox, Manjaro/fluxbox, LMDE/MATE
User avatar
Flemur
Level 5
Level 5
 
Posts: 588
Joined: Mon Aug 20, 2012 9:41 pm

Converting MP4 to AVi with Avidemux (SOLVED )

Postby bicky on Sun Sep 02, 2012 6:00 pm

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
bicky
Level 4
Level 4
 
Posts: 205
Joined: Mon May 25, 2009 3:50 pm
Location: Portugal


Return to Sound, Multimedia, & Codecs

Who is online

Users browsing this forum: Google Adsense [Bot] and 8 guests