tags:

views:

11

answers:

2

Hi i have mp3 encoded with 128 kbps in 44 khz very well sound quality when playing but when i try to add audio to video with ffmpeg the audio become in very low quality i mean very low this is the command im using :

ffmpeg -ar 22050 -ab 32k -i Afterwards.mp3 -i video_finale.mpg video_finale_sound.mpg

or

ffmpeg -i  Afterwards.mp3 -i video_finale.mpg  -vcodec video_finale_sound.mpg

but still my quality is low any idea how to fix that ?

+1  A: 

Probably has to do with the fact you're re-encoding the audio when you convert it back and forth in MP3, Try adding the original audio in wav or any other lossless audio codecs instead, and try setting the quality flags on ffmpg

Sebastian Oliva
well i tried to do it with Avanti GUI (gui for ffmpeg) and it work work fine and keeping the quality is very good as the original mp3so i guess i miss some kind of switch
+1  A: 

According to FFMPEG Documentation FFMPEG uses 64kbit as default audio bitrate, try to add -ab 128k to your command, additionally you should add -ac 2 to use stereo. You could also try to add -acodec copy to disable re encoding

mknjc
That ones are the flags you need.
Sebastian Oliva
working great !!