[FFmpeg-user] amr wideband

Ferdi Scholten ferdi at sttc-nlp.nl
Tue Apr 9 16:13:33 EEST 2024


Hey ffmpeg Team,
>
> I am trying to convert a wav file to an amr wideband format. I tried 
> using different encoders:
>
> ffmpeg -i test/calibre.wav -f awb -c:a libvo_amrwbenc calibre.awb
>
> or:
>
> ffmpeg -i test/calibre.wav -f awb -c:a libfdk_aac calibre.awb
>
> I also tried without the "-f awb" option.
>
> When typing:
>
> ffmpeg -i test/calibre.wav -c:a libvo_amrwbenc calibre.awb
>
> I get the error:
>
> ffmpeg version N-114151-g4700925d22 Copyright (c) 2000-2024 the FFmpeg 
> developers
>   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
>   configuration: --enable-libvo-amrwbenc --enable-libfdk-aac 
> --enable-libgsm --enable-libmp3lame --enable-libopencore-amrwb 
> --enable-libopencore-amrnb --enable-version3
>   libavutil      59.  1.100 / 59.  1.100
>   libavcodec     61.  1.101 / 61.  1.101
>   libavformat    61.  0.100 / 61.  0.100
>   libavdevice    61.  0.100 / 61.  0.100
>   libavfilter    10.  0.100 / 10.  0.100
>   libswscale      8.  0.100 /  8.  0.100
>   libswresample   5.  0.100 /  5.  0.100
> [aist#0:0/pcm_s16le @ 0x5647e88f1a40] Guessed Channel Layout: stereo
> Input #0, wav, from 'test/calibre.wav':
>   Metadata:
>     title           : Calibre - Feeling Normal - 03 Time To Breathe 
> (with Cimone)
>     NITR            : NTKB?y
>   Duration: 00:05:50.50, bitrate: 1411 kb/s
>   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 
> stereo, s16, 1411 kb/s
> [AVFormatContext @ 0x5647e8933d00] Unable to choose an output format 
> for 'calibre.awb'; use a standard extension for the filename or 
> specify the format manually.
> [out#0 @ 0x5647e8933bc0] Error initializing the muxer for calibre.awb: 
> Invalid argument
> Error opening output file calibre.awb.
> Error opening output files: Invalid argument
>
> When I look for the "ffmpeg -encoders" available it says, that they 
> should be availabe:
>
> A....D libopencore_amrnb    OpenCORE AMR-NB (Adaptive Multi-Rate 
> Narrow-Band) (codec amr_nb)
>  A....D libvo_amrwbenc       Android VisualOn AMR-WB (Adaptive 
> Multi-Rate Wide-Band) (codec amr_wb)
>
> I hope you can help me with that.
>
> Best regards
> Ecki

You need to set the bitrate with -b and if your input has a samplerate 
that is not 16000 Hz and is not mono, you need to set -strict to 
"unofficial"
Your input is stereo and probably has a higher samplerate, so 
unsupported by the codec unless unofficial is set. You also dit not set 
a supported bitrate.
It is all in the manual here: 
https://ffmpeg.org/ffmpeg-codecs.html#toc-libvo_002damrwbenc


More information about the ffmpeg-user mailing list