Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting error while converting wav to amr using ffmpeg

I am using ffmpeg to convert amr to wav and wav to amr.Its successfully converting amr to wav but not viceversa. As ffmpeg is supporting amr encoder decoder, its giving error.

ffmpeg -i testwav.wav audio.amr

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

like image 835
sohilv Avatar asked Apr 01 '10 10:04

sohilv


People also ask

Can FFmpeg convert WAV to mp3?

FFmpeg can be used to convert a huge WAV file into a tiny MP3 file that allows the user to listen to the same song but downloading just a portion of the original size of the WAV file.

Does FFmpeg work with mp4?

FFmpeg can input most container formats natively, including MP4, . ts, MOV, AVI, Y4M, MKV, and many others.


1 Answers

You can try setting the sample rate and bit rate. Amr supports only 8000Hz sample rate and 4.75k, 5.15k, 5.9k, 6.7k, 7.4k, 7.95k, 10.2k or 12.2k bit rates:

ffmpeg -i testwav.wav -ar 8000 -ab 12.2k audio.amr
like image 170
Radu Gasler Avatar answered Oct 03 '22 19:10

Radu Gasler