Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert a wav to a 320k mp3 using ffmpeg.
ffmpeg -i inputfile.wav -ab 320k outputfile.mp3
@gregtemp

This comment has been minimized.

Copy link

@gregtemp gregtemp commented Feb 9, 2018

/// batch
for i in *.wav; do ffmpeg -i "$i" -ab 320k "${i%.*}.mp3"; done

@Wlada

This comment has been minimized.

Copy link

@Wlada Wlada commented Aug 16, 2018

Thanks

@manojkumar-net

This comment has been minimized.

Copy link

@manojkumar-net manojkumar-net commented Mar 4, 2019

mono to stereo conversion

ffmpeg -i test.wav -af "pan=stereo|c0=c0|c1=c0" out.wav
StackOverflow

@quinwoods

This comment has been minimized.

Copy link

@quinwoods quinwoods commented Oct 1, 2021

Very good very nice 👍

@matthewjenkins97

This comment has been minimized.

Copy link

@matthewjenkins97 matthewjenkins97 commented Nov 10, 2021

Windows Batch equivalent:

for %f in (*.wav) do ( ffmpeg -i "%~nf.wav" -b:a 320k "%~nf.mp3" )

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment