Convert Y4M to 3G2 — Free Online Tool

Convert Y4M (YUV4MPEG2) lossless uncompressed video to 3G2 format using H.264 and AAC encoding, making raw video frames compatible with CDMA mobile devices and 3GPP2-based streaming. This tool encodes your uncompressed Y4M pixel data into an efficient, low-bitrate 3G2 container entirely in your browser — no upload required.

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 is an uncompressed, lossless format that stores raw YUV pixel data frame-by-frame with no compression — it is often used as a pipe format between video processing tools like FFmpeg and encoders. Converting to 3G2 involves a full encode: FFmpeg reads each uncompressed frame from the Y4M stream and runs it through the libx264 H.264 encoder, applying lossy spatial and temporal compression at CRF 23 (a balanced quality-to-size ratio). Since Y4M carries no audio, no audio stream is passed through, and the AAC audio codec parameter is set but will have nothing to encode unless the source has an embedded audio track. The -movflags +faststart flag reorganizes the 3G2 container's metadata to the front of the file, enabling progressive playback on mobile networks before the full file is downloaded.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the underlying engine that this browser tool uses via WebAssembly (FFmpeg.wasm). The same command can be run in a terminal on any desktop system with FFmpeg installed.
-i input.y4m Specifies the input file in Y4M (YUV4MPEG2) format. FFmpeg detects the Y4M container automatically and reads the raw uncompressed YUV video frames sequentially from the file for encoding.
-c:v libx264 Selects the libx264 encoder to compress the raw Y4M video frames into H.264, which is the standard video codec used inside 3G2 containers for mobile streaming. This is a full re-encode from uncompressed pixel data to compressed video.
-c:a aac Sets the audio codec to AAC (Advanced Audio Coding), the standard audio format for 3G2 containers. Since Y4M files carry no audio, this flag has no effect in practice but ensures the command is correct if an audio source were added.
-crf 23 Sets the H.264 Constant Rate Factor to 23, FFmpeg's default quality level. This controls the trade-off between visual quality and file size when encoding the raw Y4M frames — lower values preserve more detail from the original uncompressed source, higher values compress more aggressively.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, a standard quality level for mobile audio. This parameter is included for completeness but will only take effect if an audio stream is present in the source.
-movflags +faststart Moves the 3G2 container's moov atom (the metadata and index table) to the beginning of the output file. This is critical for 3G2's intended use case — streaming over CDMA mobile networks — as it allows playback to begin before the entire file has been received.
output.3g2 The output filename with the .3g2 extension, which tells FFmpeg to wrap the encoded H.264 video and AAC audio into the 3G2 container format designed for 3GPP2 CDMA mobile device compatibility.

Common Use Cases

  • Packaging raw Y4M output from a video synthesis or rendering pipeline into a mobile-compatible 3G2 file for distribution over CDMA networks or legacy 3GPP2-compatible devices.
  • Compressing a large uncompressed Y4M intermediate file — which can be hundreds of gigabytes — into a small 3G2 file for storage, archiving, or sharing with mobile recipients.
  • Converting Y4M test sequences used in video codec research or quality benchmarking into 3G2 for playback testing on CDMA handsets or embedded mobile platforms.
  • Producing 3G2 deliverables from Y4M output generated by tools like MEncoder, x264, or FFmpeg piping workflows for mobile content distribution pipelines.
  • Reducing a lossless Y4M capture from a screen recording or animation tool into a compact H.264-encoded 3G2 file suitable for MMS messaging or low-bandwidth mobile streaming.
  • Transcoding Y4M video from film grain simulation or color grading workflows into a 3G2 file for client preview on mobile devices where storage and bandwidth are constrained.

Frequently Asked Questions

Yes — this conversion is inherently lossy. Y4M stores raw, uncompressed YUV frames with no quality loss, while 3G2 uses H.264 (libx264) compression which discards visual information to reduce file size. At the default CRF 23, the quality is generally considered visually good for most content, but it is not a lossless preservation of your original frames. If you need a lossless intermediate, 3G2 is not an appropriate target format.
Dramatically smaller. A Y4M file storing uncompressed 1080p video at 24fps can easily exceed 3–4 GB per minute of footage, while H.264-encoded 3G2 at CRF 23 might produce 50–150 MB per minute depending on content complexity. The compression ratio can exceed 50:1 for typical video content, making this conversion one of the most significant file size reductions possible in video encoding.
Standard Y4M files do not carry audio — the format is video-only by specification. If your source Y4M has no audio stream, the output 3G2 file will also have no audio track, even though the FFmpeg command includes AAC audio codec parameters. Those parameters are simply ignored when no audio input is present. If you need audio in the 3G2 output, you would need to provide a separate audio source and mix it in using FFmpeg's -i flag for a second input.
Change the -crf value in the command. CRF (Constant Rate Factor) controls H.264 quality: lower values produce higher quality and larger files, while higher values produce smaller files with more compression artifacts. CRF 18 is often considered near-visually-lossless for H.264, CRF 23 is the default balance, and CRF 28–35 is suitable for small mobile files where bandwidth is more important than fidelity. For example: ffmpeg -i input.y4m -c:v libx264 -c:a aac -crf 18 -b:a 128k -movflags +faststart output.3g2
The +faststart flag moves the MP4/3G2 container's moov atom (metadata index) to the beginning of the file. Without it, the metadata is written at the end after encoding completes, which means a player must fully download the file before playback can begin. Since 3G2 was specifically designed for streaming over CDMA mobile networks with limited bandwidth, +faststart is especially important — it allows devices to start playing the video while it is still being transferred.
Yes, on your local desktop you can use a shell loop to process multiple files. On Linux or macOS: for f in *.y4m; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.y4m}.3g2"; done. On Windows (Command Prompt): for %f in (*.y4m) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.3g2". The browser-based tool processes one file at a time, so the FFmpeg command displayed on this page is particularly useful for batch workflows on your local machine.

Technical Notes

Y4M encodes video in planar YUV colorspace (typically YUV 4:2:0, 4:2:2, or 4:4:4) with no interframe compression, making it ideal as a lossless pipe format but completely impractical for distribution due to enormous file sizes. When encoding to 3G2 with libx264, FFmpeg will by default encode in YUV 4:2:0 — if your Y4M source uses 4:2:2 or 4:4:4 chroma subsampling, the encoder will downsample the chroma planes, which is an additional source of quality change beyond the H.264 compression itself. The 3G2 container is based on the ISO Base Media File Format (ISOBMFF), closely related to MP4 and MOV, so H.264 video sits very naturally in it. One important limitation is that 3G2 does not support subtitles, chapters, or multiple audio tracks, so any such metadata present in a more complex source is simply not representable in this container. The MJPEG codec is an alternative video codec available for 3G2, but libx264 is strongly preferred for its superior compression efficiency at mobile-appropriate bitrates. File sizes will vary significantly based on scene complexity — high-motion or high-detail Y4M content will produce larger 3G2 files at a given CRF than static or simple content.

Related Tools