Extract Audio from SWF to CAF — Free Online Tool
Extract audio from SWF Flash files and save it as a CAF (Core Audio Format) file, decoded to uncompressed PCM audio using the pcm_s16le codec. CAF's Apple-native container is ideal for archiving or further processing Flash audio on macOS and iOS workflows.
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 (libmp3lame) or AAC, embedded alongside Flash vector graphics and animation data. This tool strips the video and graphics streams entirely using the -vn flag, then decodes the compressed audio stream and re-encodes it into PCM 16-bit little-endian (pcm_s16le) — an uncompressed linear format — wrapped in Apple's CAF container. Because SWF audio is lossy (MP3 or AAC) and the output is uncompressed PCM, the conversion does not recover audio quality lost during the original SWF encoding, but it does produce a lossless representation of exactly what audio was stored in the Flash file, free from further lossy compression artifacts.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which handles all demuxing, decoding, encoding, and muxing steps in this conversion pipeline. |
-i input.swf
|
Specifies the input SWF file. FFmpeg's SWF demuxer parses the binary Flash format to locate and separate the embedded audio stream (typically MP3 or AAC) from the animation, vector graphics, and ActionScript data. |
-vn
|
Disables video output entirely, discarding the SWF's animation and graphics streams so that only the audio stream is processed. This is essential because SWF-contained visual data is not meaningful in a CAF audio-only output. |
-c:a pcm_s16le
|
Encodes the extracted audio as uncompressed 16-bit signed little-endian PCM, which is CAF's default and most compatible audio codec. This decodes the lossy MP3 or AAC audio from the SWF into a lossless linear representation suitable for professional audio tools in the Apple ecosystem. |
-b:a 128k
|
Specifies a target audio bitrate of 128 kbps. In practice this flag has no effect on pcm_s16le output, since uncompressed PCM does not use bitrate-based compression — the actual data rate is determined solely by the sample rate and bit depth of the source audio. |
output.caf
|
Defines the output filename and tells FFmpeg to wrap the PCM audio in Apple's Core Audio Format container. CAF supports large file sizes beyond the 4GB limit of WAV and is the native audio container format for macOS and iOS development and professional audio tools like Logic Pro. |
Common Use Cases
- Recovering background music or sound effects from legacy SWF Flash animations or games for use in modern macOS or iOS audio projects
- Archiving audio from Flash-based e-learning modules or presentations before Flash content becomes unplayable, storing it in a lossless PCM CAF file for long-term preservation
- Extracting voiceover narration from SWF interactive training content to re-use in updated video or podcast productions on Apple platforms
- Pulling sound bites or jingles from old SWF web advertisements to use in audio editing tools like Logic Pro or GarageBand, which natively support CAF
- Preparing Flash animation audio for import into Final Cut Pro or other Apple professional tools that prefer or require CAF-formatted audio assets
- Debugging or inspecting the audio content of an SWF file by extracting it into an uncompressed PCM CAF that can be analyzed waveform-by-waveform in an audio editor
Frequently Asked Questions
The CAF output will be a faithful, uncompressed representation of the audio that was stored in the SWF — no additional lossy compression is applied. However, SWF files use lossy codecs (typically MP3 or AAC) internally, so any quality loss from the original Flash encoding is already baked in and cannot be recovered. The pcm_s16le output in CAF is lossless from this point forward, making it a solid archival copy of what the SWF contained.
CAF's default audio codec is pcm_s16le (uncompressed 16-bit PCM), which is what this command uses. PCM is a universal, lossless representation that works natively in Apple's audio ecosystem, including Logic Pro, GarageBand, Core Audio APIs, and Final Cut Pro. If you want a smaller compressed file, you can modify the FFmpeg command to use -c:a aac or -c:a flac instead, both of which CAF supports.
To use AAC instead of PCM, replace '-c:a pcm_s16le' with '-c:a aac' and add '-b:a 192k' to set the bitrate: 'ffmpeg -i input.swf -vn -c:a aac -b:a 192k output.caf'. For lossless FLAC inside CAF, use '-c:a flac' (and omit -b:a, since FLAC is lossless). Note that the -b:a bitrate flag has no practical effect on pcm_s16le because PCM is uncompressed and its size is determined by sample rate and bit depth, not a target bitrate.
Yes. On macOS or Linux, you can use a shell loop: 'for f in *.swf; do ffmpeg -i "$f" -vn -c:a pcm_s16le "${f%.swf}.caf"; done'. On Windows Command Prompt, use: 'for %f in (*.swf) do ffmpeg -i "%f" -vn -c:a pcm_s16le "%~nf.caf"'. This processes every SWF in the current directory and produces a matching CAF file for each one.
FFmpeg will return an error such as 'Output file does not contain any stream' if the SWF has no audio stream, because the -vn flag discards video and if there is no audio either, there is nothing to write. You can verify whether an SWF contains audio by running 'ffprobe input.swf' and checking the listed streams before attempting extraction.
CAF is natively supported on macOS and iOS but has limited support on Windows and Linux without third-party libraries. One of CAF's key design advantages over older formats like WAV or AIFF is that it supports files larger than 4GB, making it suitable for very long or high-sample-rate audio extractions from large SWF files. If cross-platform compatibility is important, consider converting to WAV (pcm_s16le in a WAV container) instead by changing the output filename extension.
Technical Notes
SWF files embed audio using one of two lossy codecs: MP3 (libmp3lame), which is by far the most common in older Flash content, or AAC, which appeared in later SWF versions. Neither codec is stored in a standard standalone container — the audio is multiplexed directly into the SWF binary format alongside ActionScript, vector paths, and timeline data. FFmpeg's SWF demuxer handles this parsing automatically. The -vn flag ensures no attempt is made to decode the SWF's video/animation data, which would otherwise complicate processing. The output codec pcm_s16le produces 16-bit signed little-endian PCM samples, which results in file sizes significantly larger than the original SWF audio — roughly 10MB per minute of stereo audio at 44.1kHz — because all compression is removed. Metadata from SWF files (such as title or artist tags, which are rare in SWF anyway) is generally not preserved in this conversion due to SWF's limited metadata support. If the SWF contains multiple audio segments or streams, FFmpeg will typically extract the first or primary audio stream; complex SWFs with many embedded audio assets may require frame-level extraction techniques beyond a simple stream copy.