Extract Audio from SWF to WEBA — Free Online Tool
Extract the audio track from a SWF Flash file and save it as a WEBA file encoded with the Opus codec — a modern, royalty-free audio format optimized for web streaming and low-latency playback. Ideal for recovering music, voiceover, or sound effects embedded in legacy Flash animations and interactive content.
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 embed audio encoded as MP3 (libmp3lame) or AAC. During this conversion, FFmpeg discards the video and vector graphics streams entirely using the -vn flag, then re-encodes the extracted audio into Opus format inside a WebM container with a .weba extension. Because SWF's native MP3 or AAC audio must be transcoded into Opus, this is a full audio re-encode — not a stream copy — meaning there is a minor generational quality loss. The Opus codec is highly efficient and generally produces better perceptual quality than MP3 at equivalent bitrates, so the output is well-suited for web delivery even at moderate bitrates like 128k.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool. In this browser-based tool, FFmpeg.wasm runs the same command entirely in your browser via WebAssembly — no server upload occurs. The displayed command is also valid for your local FFmpeg installation, which is useful for SWF files larger than 1GB. |
-i input.swf
|
Specifies the input SWF file. FFmpeg's SWF demuxer parses the Flash container to locate embedded audio streams (typically MP3 or AAC) and video streams (FLV1 or MJPEG), making them available for selective processing. |
-vn
|
Disables video output, ensuring that the FLV1 or MJPEG video stream and all vector graphics data from the SWF are completely discarded. Only the audio stream is passed forward for encoding. This flag appears twice in the resolved command; the first instance here explicitly suppresses video during stream selection. |
-c:a libopus
|
Encodes the extracted SWF audio using the Opus codec via the libopus library. Since SWF audio (MP3 or AAC) cannot be stream-copied into a WebM container, a full transcode is required, and Opus is the modern, royalty-free default for WEBA files with excellent compression efficiency. |
-b:a 128k
|
Sets the Opus audio bitrate to 128 kilobits per second, which provides a good balance between file size and perceptual quality for typical SWF content such as background music or voiceover narration. Increase to 192k or 256k for higher-fidelity audio from SWF music files. |
-vn
|
A second -vn flag reinforced at the output stage to ensure no video stream is written to the WEBA container. WEBA is an audio-only format by design, and this flag guarantees the output file contains only the Opus audio track. |
output.weba
|
The output filename with the .weba extension, which signals to FFmpeg to use the WebM container in audio-only mode. The .weba extension is the standard designation for audio-only WebM files and is recognized by browsers as an audio resource rather than a video file. |
Common Use Cases
- Recovering background music or a theme song embedded in an old Flash game or animated website before the content becomes inaccessible due to Flash deprecation
- Extracting voiceover narration from a Flash-based e-learning module to repurpose it for a modern HTML5 course or podcast episode
- Pulling sound effects out of a SWF animation to use in a new web project, where WEBA/Opus is the preferred format for the Web Audio API
- Archiving audio content from legacy SWF promotional videos or interactive ads before they are removed from distribution
- Converting SWF-embedded audio to WEBA for use in a Chromium-based web application, where Opus in a WebM container is natively supported without additional plugins
- Extracting a musical jingle from a Flash banner ad to analyze or recreate it for a rebranding project
Frequently Asked Questions
Yes, there will be a small generational quality loss because the audio must be fully re-encoded. SWF files store audio as MP3 or AAC, and neither can be placed directly into a WEBA/WebM container, so FFmpeg decodes the source audio and re-encodes it as Opus. The good news is that Opus is one of the most efficient lossy codecs available, and at the default 128k bitrate it typically sounds transparent for most music and voice content. For critical archival use, consider raising the bitrate to 192k or 256k.
SWF files do not support multiple discrete audio tracks in the way that MKV or MP4 containers do. Audio in a SWF is typically embedded as individual sound objects tied to timeline events or streaming sound synchronized with frames. FFmpeg will extract the primary streaming audio track it detects; isolated event sounds triggered by ActionScript may not be captured. If your SWF relies heavily on event-based audio, you may find the output contains only partial audio or silence.
WEBA with Opus audio has excellent support in all Chromium-based browsers (Chrome, Edge, Opera) and Firefox on both desktop and mobile. Safari added Opus/WebM support in version 15 (2021), so modern Safari users are covered. However, WEBA is not natively supported on older iOS devices or in many non-browser media players. If compatibility with legacy systems or Apple hardware is a concern, consider extracting to MP3 or AAC instead.
Replace the value after -b:a in the command with your desired bitrate. For example, to encode at 192 kbps, change -b:a 128k to -b:a 192k. Supported values are 64k, 96k, 128k, 192k, 256k, and 320k. Higher bitrates increase file size but preserve more audio detail from the original SWF source. For voice-only content like narration, 64k or 96k Opus is usually sufficient; for music, 128k or higher is recommended.
Yes. On Linux or macOS, you can use a shell loop: for f in *.swf; do ffmpeg -i "$f" -vn -c:a libopus -b:a 128k -vn "${f%.swf}.weba"; done. On Windows Command Prompt, use: for %f in (*.swf) do ffmpeg -i "%f" -vn -c:a libopus -b:a 128k -vn "%~nf.weba". This processes each SWF in the current directory and saves a corresponding WEBA file with the same base name.
Yes. Vorbis is the other audio codec supported in the WebM/WEBA container. To switch, replace -c:a libopus with -c:a libvorbis in the command. Vorbis has slightly broader compatibility with older browsers and media players, but Opus generally delivers better quality at the same bitrate and is the recommended default for new content. Unless you have a specific compatibility requirement for Vorbis, Opus is the better choice for extracting SWF audio.
Technical Notes
SWF files present a unique extraction challenge because audio can be stored in two fundamentally different modes: streaming audio (MP3 synchronized to the Flash timeline frame by frame) and event audio (discrete MP3 or ADPCM clips triggered by ActionScript). FFmpeg's SWF demuxer is best at capturing streaming audio tracks; event-based sounds may not be recoverable this way and would require a dedicated SWF decompiler. The output WEBA container is a strict audio-only subset of the WebM format and cannot store video, subtitles, or chapter markers — which is appropriate since the intent is audio extraction. Opus in WEBA also has a fixed internal frame size and introduces approximately 26ms of algorithmic delay, which is negligible for music and voice but worth noting for precise audio synchronization use cases. Metadata such as ID3 tags or title fields embedded in the SWF's MP3 stream are generally not preserved in the Opus output, so you may want to tag the WEBA file manually after conversion using a tool like EasyTag or FFmpeg's -metadata flag.