-
-
Save dominicthomas/52e610c9cd4083408371 to your computer and use it in GitHub Desktop.
ffmpeg -i inputfile.wav -ab 320k outputfile.mp3 |
mono to stereo conversion
ffmpeg -i test.wav -af "pan=stereo|c0=c0|c1=c0" out.wav
StackOverflow
Very good very nice 👍
Windows Batch equivalent:
for %f in (*.wav) do ( ffmpeg -i "%~nf.wav" -b:a 320k "%~nf.mp3" )
Thanks for this!
Thank you for this
Yeahioui yeah 😍
If someone is converting to 320k specifically to have the highest quality MP3 available, they may also want to add -ac 2 -ar 44100 -joint_stereo 0
-ac 2
specifies two channels (stereo)-ar 44100
makes sure to output 44100Hz-joint_stereo 0
this is not commonly thought about, but it makes a difference. Basically this tells the encoder to keep the channels separate during compression and output. Joint stereo is a space-saving measure that can cause stereo separation to get muddy.
ffmpeg -i inputfile.wav -ab 320k -ac 2 -ar 44100 -joint_stereo 0 outputfile.mp3
What is the difference between -ab
and -b:a
?
Why with -b:a 320k -ac 2 -ar 44100 -joint_stereo 0
it displays "guessed channel layout stereo"? Is -ac 2
not stereo?
joint stereo question
joint stereo is suppose to save space but both files have the same size 8,56mb
I compared them with "spek" and you can see that joint stereo have more data than stereo
@Joshfindit @chepe263
joint stereo
Is
-ac 2
not stereo?
In practice yes 99% of the time but FFMPEG avoids black-box assumptions. Maybe someone wants to encode front-left and rear-left for some reason, or centre and a sub.
joint stereo question joint stereo is suppose to save space but both files have the same size 8,56mb I compared them with "spek" and you can see that joint stereo have more data than stereo
That’s the other reason I always choose separated stereo: when specifying CBR of 320k, the “on-disk” size will be the same since each second contains 320kb regardless of joint or separated stereo and therefore you can’t get any of the “space saving benefits” and just get the muddiness.
Thanks