Getting error converting wav to amr using ffmpeg

I use ffmpeg to convert amr to wav and wav to amr.Its successfully converts amr to wav, but not vice versa. Since ffmpeg supports the encr encr decoder, its error is thrown.

ffmpeg -i testwav.wav audio.amr

An error occurred while opening the encoder for output stream # 0.0 - possibly incorrect parameters such as bitrate, speed, width or height

+6
ffmpeg audio wav amr
source share
1 answer

You can try setting the sampling rate and bit rate. Amr only supports a sampling frequency of 8000 Hz and a data transfer rate of 4.75 thousand, 5.15 thousand, 5.9 thousand, 6.7 thousand, 7.4 thousand, 7.95 thousand, 10.2 thousand or 12.2 thousand bits:

ffmpeg -i testwav.wav -ar 8000 -ab 12.2k audio.amr 
+11
source share

All Articles