Convert Y4M to AMR — Free Online Tool

Convert Y4M (YUV4MPEG2) video files to AMR audio, extracting and encoding the audio stream using the libopencore_amrnb codec optimized for speech. Since Y4M is a raw, uncompressed intermediate format and AMR is a narrow-band speech codec built for mobile telephony, this tool efficiently strips the video and produces compact, voice-optimized audio output.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

Y4M files contain raw, uncompressed YUV video frames with no audio compression — in fact, Y4M files typically carry no audio track at all, as the format is primarily used as a lossless video pipe between tools like x264 or FFmpeg filters. When converting to AMR, FFmpeg attempts to extract any audio stream present in the Y4M container and encode it using the libopencore_amrnb (Adaptive Multi-Rate Narrowband) codec at the selected bitrate. If no audio track exists in the source file, the output AMR file will be empty or the conversion will fail — this is expected behavior given Y4M's nature as a video-only intermediate format. If audio is present, it is re-encoded (not copied) into AMR's speech-optimized compression, which uses Code-Excited Linear Prediction (CELP) and operates on 20ms frames of audio at a fixed 8 kHz sample rate.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, the open-source multimedia processing engine that handles demuxing the raw Y4M input, resampling audio if needed, and encoding to AMR-NB output.
-i input.y4m Specifies the input file in YUV4MPEG2 (Y4M) format — a raw, uncompressed video stream. FFmpeg will attempt to find an audio track within this container, though Y4M files almost never contain one.
-c:a libopencore_amrnb Sets the audio encoder to libopencore_amrnb, the open-source implementation of the AMR Narrowband codec. This encoder is required for writing AMR-NB compatible output and operates at a fixed 8 kHz sample rate, making it suited only for speech content.
-b:a 12200 Sets the AMR-NB encoding bitrate to 12,200 bps (12.2 kbps), which corresponds to Mode 7 — the highest quality mode available in AMR Narrowband. This matches the codec's EFR (Enhanced Full Rate) mode used in GSM telephony for best speech intelligibility.
output.amr Defines the output filename with the .amr extension, signaling FFmpeg to write an IETF AMR-NB file with the standard '#!AMR' file header, compatible with Android, feature phones, and media players like VLC.

Common Use Cases

  • Extracting a voice-over or commentary audio track from a Y4M file produced by a screen capture or video synthesis pipeline, to use in mobile apps that require AMR format.
  • Converting audio captured alongside raw Y4M video in a video processing workflow into AMR for archival or transmission over low-bandwidth mobile networks.
  • Preparing speech audio embedded in a Y4M intermediate file for use in telephony or VoIP systems that specifically accept AMR-NB encoded files.
  • Pulling audio from a Y4M file generated by a tool like libav or an encoder test suite and converting it to a compact AMR file for playback on older mobile handsets.
  • Stripping and re-encoding audio from a Y4M video used in broadcast quality testing workflows to create a lightweight AMR version for voice review on a mobile device.

Frequently Asked Questions

Almost certainly not in most cases — Y4M is a raw, video-only intermediate format designed for piping uncompressed frames between tools, and the specification has no standard mechanism for embedding audio. If your Y4M file was generated by a typical encoding pipeline (e.g., from x264, FFmpeg filters, or tools like avisynth/vapoursynth), it will contain no audio track. In that case, FFmpeg will have nothing to encode and the output AMR file will be empty or the process will produce an error. If your Y4M does contain audio, it was likely embedded by a non-standard tool.
AMR Narrowband at 12.2 kbps (the highest AMR-NB bitrate, also called Mode 7 or EFR-equivalent) is the best quality this codec offers, but it is still designed exclusively for human speech at an 8 kHz sample rate. Any audio that is not voice — music, environmental sounds, or broadband content above 4 kHz — will sound severely muffled and degraded. Even for speech, the 8 kHz ceiling means the full telephone-quality effect applies. This is a lossy, irreversible transformation: the original audio fidelity cannot be recovered from the AMR file.
AMR-NB (Narrowband) operates at 8 kHz sample rate with bitrates from 4.75 to 12.2 kbps, offering telephone-grade speech quality. AMR-WB (Wideband) operates at 16 kHz sample rate with bitrates from 6.6 to 23.85 kbps and produces noticeably clearer, more natural-sounding speech. This tool defaults to AMR-NB (libopencore_amrnb) for maximum compatibility with older mobile devices. If your target device or application supports AMR-WB (.awb files), switching to libopencore_amrwb in the FFmpeg command will give significantly better voice quality.
The AMR-NB codec supports only specific fixed bitrates: 4750, 5150, 5900, 6700, 7400, 7950, 10200, or 12200 bps. To change the bitrate, replace the value after '-b:a' in the command, for example: 'ffmpeg -i input.y4m -c:a libopencore_amrnb -b:a 7950 output.amr'. The default of 12200 bps (Mode 7) gives the highest quality; reducing it to 4750 bps (Mode 0) produces the smallest files but with noticeably degraded intelligibility. Note that FFmpeg will snap to the nearest valid AMR mode if you specify an unsupported bitrate.
AMR-NB files (.amr) have native playback support on most Android devices and many feature phones, but iOS support is limited without third-party apps. Modern desktop media players like VLC support AMR playback. However, because AMR is a speech codec, any non-voice audio will sound poor regardless of the player. For sharing audio that contains anything other than speech, a more general-purpose format like AAC or MP3 would be far more appropriate.
The command shown on this page processes a single file, but you can adapt it for batch conversion in a shell script. On Linux or macOS, use: 'for f in *.y4m; do ffmpeg -i "$f" -c:a libopencore_amrnb -b:a 12200 "${f%.y4m}.amr"; done'. On Windows Command Prompt, use: 'for %f in (*.y4m) do ffmpeg -i "%f" -c:a libopencore_amrnb -b:a 12200 "%~nf.amr"'. Keep in mind that most Y4M files lack audio, so most outputs in a batch like this will likely be empty.

Technical Notes

Y4M is a headerless-like raw format where each frame is preceded by a short ASCII header, making it unsuitable for carrying audio in standard practice — the ffmpeg Y4M demuxer does not expect or process audio streams. AMR-NB output via libopencore_amrnb enforces a hard 8000 Hz sample rate: if any source audio exists at a different sample rate (e.g., 44100 Hz), FFmpeg will automatically resample it down to 8 kHz, which introduces additional quality loss on top of the lossy AMR encoding. The output .amr file uses the IETF storage format with the '#!AMR
' magic header for AMR-NB, which is compatible with most mobile platforms. Metadata preservation is effectively nil: Y4M carries no embedded metadata, and AMR does not support ID3 tags or equivalent metadata containers, so no title, artist, or timestamp information will survive the conversion. There is no video stream in the output — AMR is a pure audio container and all video data from the Y4M source is discarded.

Related Tools