I'm using windows and ffmpeg to convert video mp4 into audio mp3. I've come up with the following batch line that will do the job:
for %f in (*.mp4); do ffmpeg -i %f -vn -ar 44100 -ac 1 -b:a 32k -f mp3 %f.mp3
However, the %f
variable captures the whole filename with the extension, so my output looks like filename.mp4.mp3
. I'd rather it look like filename.mp3
.
I've tried all sorts of brackets and truncation methods I know of but I cannot get anything to work.
How can I change the filenames in an ffmpeg batch conversion on Windows?