Convert Y4M to VOC — Free Online Tool
Convert Y4M (YUV4MPEG2) video files to VOC audio format, extracting the raw PCM audio stream and encoding it as unsigned 8-bit PCM (pcm_u8) — the native codec for Creative Labs' Sound Blaster VOC format. This is a niche but precise tool for retro audio workflows that need DOS-compatible sound files derived from uncompressed video sources.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your Y4M file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
Y4M is a headerless, uncompressed video container used primarily as an intermediate format in video processing pipelines — it carries raw YUV video frames and may include an audio stream. During this conversion, FFmpeg discards the video frames entirely and extracts any audio present in the Y4M file, re-encoding it as unsigned 8-bit PCM (pcm_u8) and wrapping it in the VOC container format developed by Creative Labs. The VOC format supports only raw PCM audio at limited bit depths (8-bit unsigned or 16-bit signed little-endian), so pcm_u8 is used as the default. No video data is preserved — the output is a pure audio file compatible with DOS-era Sound Blaster hardware and software.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which is the engine running inside this browser tool via WebAssembly (FFmpeg.wasm). The same binary is available for desktop use on Windows, macOS, and Linux. |
-i input.y4m
|
Specifies the input file in YUV4MPEG2 (Y4M) format — an uncompressed, headerless video container. FFmpeg reads both the raw video frames and any embedded audio stream from this file, though only the audio is used in the output. |
-c:a pcm_u8
|
Sets the audio codec to unsigned 8-bit PCM (pcm_u8), which is the standard and most compatible audio encoding for the VOC container format. This matches the original Sound Blaster audio depth expected by DOS-era software and hardware. |
output.voc
|
Defines the output file as a VOC file — Creative Labs' Sound Blaster audio container. FFmpeg infers the VOC muxer from the .voc extension and writes the pcm_u8 audio stream into the VOC chunked binary structure. |
Common Use Cases
- Extracting audio from a Y4M intermediate file produced by a lossless video processing pipeline to create a Sound Blaster-compatible VOC sound effect for a retro DOS game mod
- Converting recorded audio streams embedded in Y4M test files — commonly generated by tools like ffmpeg or mjpegtools — into VOC format for playback testing on DOSBox or vintage PC emulators
- Producing unsigned 8-bit PCM audio assets in VOC format from a Y4M source for integration into legacy multimedia authoring tools that only accept Creative Labs audio formats
- Archiving audio content from Y4M lossless masters into the VOC format for retro gaming preservation projects that require period-accurate audio containers
- Generating short VOC sound clips from Y4M video segments for use in open-source DOS game engines like ioquake or custom ScummVM game builds
- Validating audio fidelity in a Y4M intermediate file by converting it to VOC and auditioning the raw 8-bit PCM output in a retro audio player or hex editor
Frequently Asked Questions
Y4M files frequently contain no audio at all — the format is primarily designed for uncompressed video piping between tools like ffmpeg, x264, and vapoursynth. If your Y4M file has no embedded audio stream, this conversion will fail or produce an empty/invalid VOC file because there is no audio data to extract. You should verify your Y4M source contains audio before converting. Tools like 'ffprobe input.y4m' can confirm whether an audio stream is present.
The VOC format's most common and widely compatible mode is unsigned 8-bit PCM (pcm_u8), which is the default codec used in this conversion. 8-bit PCM has a dynamic range of only about 48 dB, compared to 96 dB for 16-bit audio — this means the output will sound noticeably noisier and less detailed than the source, especially for music. If your target application supports it, you can switch to pcm_s16le (16-bit signed little-endian) for better fidelity, though compatibility with very old DOS software may be reduced.
Yes. Replace '-c:a pcm_u8' with '-c:a pcm_s16le' in the command to encode the audio as 16-bit signed little-endian PCM, which is the other codec supported by the VOC format. The resulting file will have better dynamic range and lower noise floor. The command becomes: ffmpeg -i input.y4m -c:a pcm_s16le output.voc. Note that some very old DOS programs and Sound Blaster drivers only support 8-bit VOC playback, so test compatibility with your target application.
FFmpeg will carry the source audio's sample rate into the VOC output by default, but the VOC format has limitations — it was originally designed for low sample rates typical of early Sound Blaster hardware (commonly 8000 Hz, 11025 Hz, 22050 Hz, or 44100 Hz). If your Y4M audio is at an unusual or very high sample rate, some legacy VOC players may not support it. You can resample explicitly by adding '-ar 22050' (or another standard rate) to the command if compatibility is a concern.
No. The VOC format is a pure audio container — it cannot store video streams. FFmpeg automatically drops the video frames from the Y4M input during this conversion. The output .voc file contains only the encoded PCM audio. This is expected behavior, not data loss in the conventional sense — you are intentionally extracting audio from a video source.
On Linux or macOS, you can use a shell loop: 'for f in *.y4m; do ffmpeg -i "$f" -c:a pcm_u8 "${f%.y4m}.voc"; done'. On Windows Command Prompt, use: 'for %f in (*.y4m) do ffmpeg -i "%f" -c:a pcm_u8 "%~nf.voc"'. Each Y4M file is processed sequentially, producing a corresponding VOC file. This is especially useful for generating multiple retro game sound assets from a batch of lossless video intermediates, and works identically to the command this browser tool uses internally.
Technical Notes
The Y4M format stores raw YUV video frames with a simple text header and is almost exclusively used as an intermediate format in professional and open-source video pipelines — it is not a distribution format and rarely carries audio, which is the most important practical consideration for this conversion. The VOC format, introduced by Creative Labs in the early 1990s for the Sound Blaster ISA sound card, uses a chunked binary structure and supports only raw PCM audio at 8-bit unsigned or 16-bit signed little-endian depths. There is no compression, no metadata beyond basic headers, and no support for multi-channel audio beyond mono or stereo. Because both formats are ultimately uncompressed PCM at the audio level, no lossy quality degradation occurs in the audio encoding step itself — however, downsampling from a high bit-depth source to 8-bit pcm_u8 inherently reduces dynamic range. The VOC container does not support chapters, subtitles, or embedded artwork. FFmpeg's VOC muxer is mature and well-tested given the format's simplicity, but the output file's compatibility depends heavily on the sample rate and whether the target application supports the chosen bit depth.