Convert SWF to VOC — Free Online Tool
Extract and convert the audio track from a SWF Flash file into a VOC file encoded with unsigned 8-bit PCM — the raw, lossless audio format used by Creative Labs Sound Blaster cards in classic DOS-era software. This tool strips the FLV1 video and MP3 audio from the SWF container and re-encodes it to pcm_u8, making it directly compatible with retro game engines, DOSBox, and legacy multimedia applications.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your SWF 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
SWF files typically carry audio encoded as MP3 (via libmp3lame) inside an Adobe Flash container alongside FLV1 or MJPEG video. During this conversion, FFmpeg demuxes the SWF container to extract the audio stream, discards all video data entirely, and then transcodes the compressed MP3 audio into uncompressed unsigned 8-bit PCM (pcm_u8). The result is written into a VOC container — a simple, headerless-style format developed by Creative Labs. Because pcm_u8 is uncompressed and operates at a very low bit depth (8 bits per sample), the output file stores raw amplitude values as unsigned integers from 0–255, which is natively readable by Sound Blaster hardware and DOS-compatible audio APIs. The lossy MP3 source means some audio fidelity is already baked in from the SWF, and the downconversion to 8-bit PCM further reduces dynamic range compared to 16-bit formats.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg multimedia processing tool, which handles demuxing the SWF container, decoding the embedded MP3 audio, and re-encoding it as pcm_u8 PCM for the VOC output. |
-i input.swf
|
Specifies the input SWF file. FFmpeg's SWF demuxer reads the Flash binary format, parses its internal tag structure, and exposes the embedded video and audio streams for processing. |
-c:a pcm_u8
|
Sets the audio codec to unsigned 8-bit PCM, the native audio encoding for Creative Labs Sound Blaster VOC files. This decodes the MP3 audio from the SWF and re-encodes it as raw uncompressed 8-bit samples, where amplitude values range from 0 to 255 with 128 representing silence. |
output.voc
|
Specifies the output file in VOC (Creative Voice File) format. FFmpeg infers the VOC container from the .voc extension and writes the pcm_u8 audio stream into the proper Creative Labs VOC structure, including the identifying file header. All video streams from the SWF are automatically discarded since VOC is an audio-only format. |
Common Use Cases
- Extracting sound effects or music from old Flash games or animations to use as audio assets in a DOSBox-based retro game project
- Converting a Flash-based e-learning module's narration audio into a VOC file for playback on a Sound Blaster-compatible legacy system
- Archiving audio content from SWF files before browser Flash support is fully removed, preserving it in a stable, uncompressed PCM format
- Sourcing 8-bit audio assets from SWF animations for use in chiptune or lo-fi music production where pcm_u8 character is a desired aesthetic
- Integrating audio from Flash multimedia presentations into a retro DOS demo or game that requires VOC-formatted sound files
- Testing Sound Blaster audio playback pipelines by generating VOC files from known SWF audio sources for debugging legacy hardware drivers
Frequently Asked Questions
Yes, some quality reduction is expected at two stages. First, the audio in the SWF is already compressed as MP3 (a lossy format), so some fidelity was lost when the SWF was originally created. Second, re-encoding to pcm_u8 (8-bit unsigned PCM) reduces the dynamic range significantly — 8-bit audio can represent only 256 amplitude levels, compared to 65,536 levels in 16-bit audio. For voice narration or simple sound effects this is often acceptable, but music with wide dynamic range will sound noticeably flatter or noisier.
The VOC format supports both pcm_u8 and pcm_s16le, but pcm_u8 is the default because it was the native audio format of the original Creative Labs Sound Blaster (SB 1.0 and SB 2.0) cards used in early DOS systems. Most classic DOS games and applications were built around 8-bit VOC playback. If you need higher fidelity and your target application supports Sound Blaster 16 or higher, you can manually change the FFmpeg command to use -c:a pcm_s16le for 16-bit output, which doubles the bit depth and significantly improves dynamic range.
No. The VOC format is an audio-only container and cannot store video data. FFmpeg automatically drops all video streams when writing to a VOC output file. If you need to preserve the SWF's visual content, you would need to convert to a video-capable output format separately. This tool is specifically useful when you only need the audio track from a Flash file.
Simply replace pcm_u8 with pcm_s16le in the command: ffmpeg -i input.swf -c:a pcm_s16le output.voc. This instructs FFmpeg to encode the audio as signed 16-bit little-endian PCM instead of 8-bit unsigned PCM, resulting in significantly better dynamic range and less quantization noise. This is useful if your target application or hardware supports Sound Blaster 16-compatible VOC files rather than original 8-bit Sound Blaster output.
Yes, on the command line you can use a shell loop to process multiple files. On Linux or macOS: for f in *.swf; do ffmpeg -i "$f" -c:a pcm_u8 "${f%.swf}.voc"; done. On Windows Command Prompt: for %f in (*.swf) do ffmpeg -i "%f" -c:a pcm_u8 "%~nf.voc". Each SWF file's audio will be extracted and saved as a separate VOC file with the same base filename. The in-browser tool processes one file at a time, so the FFmpeg command is especially useful for bulk conversions.
By default, FFmpeg will carry over the sample rate from the SWF's audio stream (commonly 22050 Hz or 44100 Hz in Flash content) into the VOC output. The original Sound Blaster hardware supported sample rates up to 22050 Hz for 8-bit mono audio, so if compatibility with very old hardware is critical, you can add -ar 22050 to the command: ffmpeg -i input.swf -c:a pcm_u8 -ar 22050 output.voc. For modern retro emulators like DOSBox, higher sample rates are generally supported without issue.
Technical Notes
The SWF container (Small Web Format) bundles compressed Flash content including FLV1 or MJPEG video streams and MP3 or AAC audio streams into a single binary file. When demuxing for audio extraction, FFmpeg's SWF demuxer parses the Flash tags to locate and extract the embedded audio stream. The VOC format, by contrast, is a simple sequential container developed by Creative Labs consisting of a fixed 26-byte header identifying it as a Creative Voice File, followed by typed data blocks containing raw PCM samples. The pcm_u8 codec stores samples as unsigned 8-bit integers centered at 128 (silence), which differs from the signed convention used by most modern audio formats. One key limitation is that VOC files do not support metadata fields like title, artist, or album tags, so any ID3 or other tags embedded in the SWF's MP3 stream will be lost. The VOC format also does not support multiple audio tracks, chapters, or subtitles. Because the source MP3 in SWF is already lossy, this conversion chain (MP3 → pcm_u8) is a lossy-to-lossless transcoding in terms of the output container, but the perceptual quality ceiling is still bounded by the original MP3 compression applied when the SWF was authored.