Conversion of audio file format with ffmpeg command

order of the day

1. Convert MP3 to WAV

ffmpeg -i input.mp3 -acodec pcm_ s16le -ac 1 -ar 8000 output.wav

2. Convert m4a to wav

ffmpeg -i input.m4a -acodec pcm_ s16le -ac 1 -ar 8000 output.wav

3. Conversion between wav and PCM

ffmpeg – iinput.wav -f s16le -ar 8000 -acodec pcm_ s16le output.raw

4. PCM to WAV

ffmpeg -f s16le -ar 8000-ac 1 -acodec pcm_ s16le -i input.raw output.wav

Note:
– acodec PCM_ s16le pcm_ S16le 16bits encoder
– F s16le is saved in 16bits PCM format
– AC 1 mono
– AR 8000 sampling rate

Ffmpeg installation configuration see blog:

https://blog.csdn.net/qq_ 39516859/article/details/81843419


Read More: