This can be very helpful is you are compressing an entire album from PCM wav to mp3. Or to convert a video file into just the audio from that file.
Place this .bat script in the same directory as ffmpeg.exe and simply select all the files that need converting and drag and drop them onto the .bat script file. FFmpeg will cycle through and encode all of them to mp3 using lame. It will save the output mp3 files to the same directory as the originally selected files.
The script is attached inside the .zip file, but here is the code:
Code: Select all
@ECHO OFF SET bitrate=320 FOR %%A IN (%*) DO ( IF NOT EXIST "%%~nA.mp3" %~dp0\ffmpeg.exe -i %%A -vn -c:a libmp3lame -b:a %bitrate%k "%%~nA.mp3" )
If there is a interest for more batch scripts let me know, these are only really helpful when dealing with a large number of files.