So I am looking to batch convert many AMR files to MP3 (while also adjusting the Sampling rate so it is at least 16) and it occurred to me I would also like to normalize the volume on these files and possibly make other tweaks.-sphere
ffmpeg.exe -i input.amr -ar 44100 -filter:a loudnorm -c:a libmp3lame -q:a 3 output.mp3
-ar 44100 = Audio sample rate 44100, (ie. same as CD)
-filter:a loudnorm = Apply a single pass normalisation algorithm, (you can also do 2 pass)
-c:a libmp3lame = Encode using the MP3 codec
-q:a 3 = Average bitrate of 175kb/s
Additionally, I have a number of movies I would like to do the same.
ffmpeg.exe -i input.mp4 -v:c copy -filter:a loudnorm -c:a aac -b:a 160k -c:s copy output.mp4
-v:c copy = Copy the video stream
-c:a aac = Encode audio stream using AAC codec
-b:a 160k = Constant bitrate of 160kb/s
-c:s copy = Copy the subtitle stream
A Finally, I sometimes like extracting the audio from videos so I can listen on the go.
ffmpeg.exe -i input.mp4 -vn -sn -dn -c:a libmp3lame -q:a 3 output.mp3
-vn = Don't process video streams
-sn = Don't process subtitle streams
-dn = Don't process data streams
To do all the files in a directory, for example for the first case:
FOR /F "tokens=*" %G IN ('dir /b *.amr') DO ffmpeg.exe -i "%G" -ar 44100 -filter:a loudnorm -c:a libmp3lame -q:a 3 "%~nG.mp3"
All the above assume ffmpeg.exe is in your path somewhere otherwise you'll have to input the full path to it.
ffmpeg.exe has more options than there are words in the dictionary, (almost), so you can tweak until you're giddy.
For maximum stability you want the
Static 32bit release: