How to Encode Audio to AMR-WB with FFmpeg

This guide provides a quick and practical overview of how to encode audio files into the Adaptive Multi-Rate Wideband (AMR-WB) format using FFmpeg. You will learn the required command-line syntax, necessary audio constraints, and how to utilize the external libvo_amrwbenc encoder library.

To encode audio to AMR-WB, your FFmpeg installation must be compiled with support for the libvo_amrwbenc library. You can check if this is enabled in your FFmpeg build by running ffmpeg -codecs and looking for libvo_amrwbenc.

The Basic AMR-WB Encoding Command

Because the AMR-WB standard has strict requirements, you must explicitly set the sample rate to 16000 Hz and the channel count to mono (1 channel).

Here is the standard FFmpeg command to convert an input audio file to AMR-WB:

ffmpeg -i input.wav -c:a libvo_amrwbenc -ar 16000 -ac 1 -b:a 23.85k output.awb

Command Parameters Explained

  • -i input.wav: Specifies the path to your source audio file. This can be in WAV, MP3, OGG, or any other format supported by FFmpeg.
  • -c:a libvo_amrwbenc: Selects the VisualOn AMR-WB encoder.
  • -ar 16000: Sets the audio sampling rate to 16 kHz. This is a mandatory requirement for the AMR-WB format.
  • -ac 1: Downmixes the audio to 1 channel (mono). AMR-WB does not support stereo streams.
  • -b:a 23.85k: Sets the audio bitrate. If you do not specify this, FFmpeg will default to a standard bitrate.
  • output.awb: The destination file. The .awb extension is standard for wideband AMR files, though .amr is also sometimes used.

Supported Bitrates

AMR-WB operates at specific, predefined bitrates. When setting the -b:a parameter, you must choose one of the following exact values:

  • 6.60k (6600)
  • 8.85k (8850)
  • 12.65k (12650)
  • 14.25k (14250)
  • 15.85k (15850)
  • 18.25k (18250)
  • 19.85k (19850)
  • 23.05k (23050)
  • 23.85k (23850) — Recommended for the highest audio quality.