HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - General => Topic started by: johnbil on 2013-04-28 21:27:32

Title: FFMPEG Command Line
Post by: johnbil on 2013-04-28 21:27:32
I am trying to write a batch file to normalize the audio portion of some AVI files. I'm more or less finished, but am have a little difficulty with a couple of the specifics.

I am using this command line to create a temporary audio file:

ffmpeg -i filename.avi -vn -acodec copy -y tempaudio.mp3

I am looking to have the file have a specific Bitrate (128 Kbps) and Sample Rate (48000 Hz). What adjustments would I have to make to the above to achieve this? 

Thanks in advance,
John
Title: FFMPEG Command Line
Post by: Kohlrabi on 2013-04-28 21:43:48
You need to reencode the audio stream. Try:
Code: [Select]
ffmpeg -i filename.avi -vn -sn -acodec libmp3lame -ab 128k -ar 48k -y tempaudio.mp3
Title: FFMPEG Command Line
Post by: johnbil on 2013-04-29 07:51:43
That did it. Thanks.