Extract Audio from SWF to M4B — Free Online Tool

Extract audio from SWF Flash files and save it as an M4B audiobook file, re-encoding the audio stream from MP3 (libmp3lame) to AAC inside an MPEG-4 container optimized for chapter-aware playback. Ideal for recovering narration, dialogue, or music from legacy Flash content for use in podcast and audiobook players.

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

SWF files typically carry audio encoded with libmp3lame (MP3) or AAC, embedded alongside Flash vector animation and interactive content. This tool discards the video and animation streams entirely using the -vn flag, then re-encodes the audio track to AAC at 128k bitrate — the native codec for the M4B container. The output is wrapped in an MPEG-4 container with the +faststart flag applied, which moves metadata to the front of the file. Because SWF's default audio codec (MP3) differs from M4B's required AAC codec, a full audio transcode is performed rather than a simple stream copy, which is a fast operation since no video processing is involved.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all media demuxing, decoding, encoding, and muxing. In the browser version of this tool, FFmpeg runs via WebAssembly (ffmpeg.wasm) without any server involvement.
-i input.swf Specifies the input SWF file. FFmpeg demuxes the SWF container, identifying the embedded audio stream (typically MP3/libmp3lame) and any animation or video streams present.
-vn Disables all video and animation stream output, discarding Flash vector graphics, timeline animations, embedded FLV video, and interactivity. Since M4B is audio-only, this ensures only the audio track is processed.
-c:a aac Re-encodes the audio stream to AAC using FFmpeg's built-in AAC encoder. This transcode is required because SWF's default audio (MP3) is not natively supported in the M4B/MPEG-4 container, and AAC is the standard codec for M4B audiobook files.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, a balanced default that provides good clarity for voice narration and spoken-word content extracted from Flash e-learning or audiobook SWFs without excessive file size.
-movflags +faststart Moves the MPEG-4 container's moov atom to the beginning of the output file. This is essential for M4B audiobook playback, allowing apps like Apple Books and podcast players to load bookmarks and chapter data instantly without parsing the entire file.
output.m4b Defines the output filename and signals FFmpeg to mux the AAC audio into an MPEG-4 container with the .m4b extension, which identifies it as an audiobook file to compatible players and operating systems.

Common Use Cases

  • Recovering narrated educational content from old Flash-based e-learning modules and converting it into an M4B audiobook for playback in Apple Books or Podcast apps
  • Extracting voice-over audio from archived Flash animations or explainer videos to repurpose as standalone podcast episodes with chapter support
  • Salvaging music or ambient soundscapes from legacy Flash games or interactive web experiences before they become completely inaccessible
  • Converting Flash-based audiobook players (a common distribution format in the mid-2000s) into native M4B files that support bookmarking on modern devices
  • Pulling narration tracks from SWF-based digital children's books or storybooks to create M4B files compatible with kids' audiobook apps
  • Archiving audio commentary or lecture content embedded in SWF presentations before the source Flash assets are lost or deleted

Frequently Asked Questions

SWF files most commonly use MP3 (libmp3lame) as their default audio codec, while M4B is designed around AAC audio inside the MPEG-4 container. These are incompatible codecs, so a direct stream copy is not possible — the audio must be decoded from MP3 and re-encoded as AAC. This is still a fast process because the video and animation layers of the SWF are discarded entirely and never processed.
The output M4B file will be fully compatible with chapter and bookmarking features at the container level, but no chapter markers will be present unless you add them manually afterward, since SWF has no chapter structure to extract. Players like Apple Books will still remember your playback position (bookmarking), which already makes it more functional than the original SWF for long-form listening. If you need chapters, you can add them post-conversion using tools like mp4chaps or Audacity.
Replace the -b:a 128k value with your preferred bitrate. For voice-only content like narration or audiobooks, 64k or 96k is typically sufficient and produces smaller files. For music or rich soundscapes extracted from Flash games, 192k or 256k will better preserve fidelity. The full range of supported values for M4B AAC output is 64k, 96k, 128k, 192k, 256k, and 320k.
All visual and interactive elements — including vector graphics, timeline animations, ActionScript interactivity, and embedded video streams — are completely discarded by the -vn flag. Only the audio track is extracted and re-encoded. This is intentional: M4B is a pure audio format and has no capacity for video or interactive content.
Yes. On Linux or macOS you can use a shell loop: for f in *.swf; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k -movflags +faststart "${f%.swf}.m4b"; done. On Windows Command Prompt, use: for %f in (*.swf) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k -movflags +faststart "%~nf.m4b". Each SWF file will be processed sequentially, producing a separate M4B output file.
SWF files do not carry standard ID3 or metadata tags in the way that audio containers do, so there is typically no embedded title, artist, or album metadata to transfer. The M4B container supports rich ID3-style tags, but you will need to add these manually after conversion using a tag editor like Mp3tag or MusicBrainz Picard. This is especially useful if you are creating a proper audiobook file intended for distribution.

Technical Notes

SWF audio extraction carries a few important caveats. First, not all SWF files contain a continuous audio track — some Flash content streams audio in small, looping chunks synchronized to the animation timeline, which FFmpeg may stitch together but could result in gaps or repeated segments in the output. Second, if the SWF uses AAC audio instead of the more common MP3 (libmp3lame), the transcode is still required because the SWF container wraps AAC differently than the MPEG-4 container does. The -movflags +faststart flag is particularly meaningful for M4B output: it repositions the moov atom to the beginning of the file, which allows audiobook players to begin playback and resume bookmarks without reading the entire file first — important for larger audio extractions. Quality loss is inherent in this pipeline since you are decoding lossy MP3 from the SWF and re-encoding to lossy AAC; keeping the bitrate at 128k or above minimizes generation loss for most spoken-word content. For music-heavy SWF files, consider increasing to 192k. The M4B format does not support multiple audio tracks, but SWF files rarely contain more than one audio stream, so this is unlikely to be a limitation in practice.

Related Tools