Sunday, March 18, 2012

batch ffmpeg convert mp4 mp3

Not my best FOR loop, quick and nasty.
Had a stack of mp4 videos to convert for the ride home.

mp4mp3.cmd <batch file>

for /f "delims=." %%a in ('dir *.mp4 /b') do G:\music\ffmpeg.exe -i "%%a.mp4" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "%%a.mp3"

2 comments:

jared said...

I am trying to do a batch audio edit (adding intro and outro to a bunch of audio files). I want to maintain the file name and dump the new files into a new folder, but I am using Linux. Any ideas how to accomplish this?

JustVisiting said...

Mate, had a quick look, current not running any linux @ home - http://superuser.com/questions/202809/join-multiple-mp3-files-lossless

has to be a easier way.