Extract Audio from SWF to J2B — Free Online Tool
Extract audio from SWF (Shockwave Flash) files and save it as J2B, the ASYLUM Music Format used by Jazz Jackrabbit 2. The tool strips the video stream entirely and re-encodes the MP3 audio track from the SWF using the LAME encoder, outputting a J2B-compatible file directly in your browser.
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 with libmp3lame (MP3) or AAC alongside a video stream using FLV1 or MJPEG codecs. This conversion discards the video stream entirely using the -vn flag, then takes the audio and re-encodes it using the LAME MP3 encoder at 128k bitrate to produce output wrapped in the J2B container. J2B is a niche game audio format rooted in the ASYLUM Music Format with a simple binary header, and it uses MP3 as its underlying audio codec — which makes libmp3lame the natural and only supported encoder for this output. Because both SWF's default audio and J2B use MP3-based encoding, the primary transformation here is a container change and a potential quality re-encode if the source SWF audio bitrate differs from the target 128k.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg multimedia processing tool, which handles the decoding of the SWF container, audio stream extraction, re-encoding, and writing of the J2B output file. |
-i input.swf
|
Specifies the input SWF file. FFmpeg demuxes the SWF container to access its internal video (FLV1 or MJPEG) and audio (MP3 or AAC) streams for processing. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore the SWF's FLV1 or MJPEG video stream so that only the audio is processed into the J2B output. |
-c:a libmp3lame
|
Selects the LAME MP3 encoder to encode the extracted SWF audio. Since J2B only supports MP3-based audio, libmp3lame is the required and only valid encoder for this output format. |
-b:a 128k
|
Sets the output audio bitrate to 128 kilobits per second. This is the default quality setting for J2B output and provides a balance between file size and audio fidelity; it can be raised up to 320k for better quality at the cost of a larger file. |
output.j2b
|
Defines the output filename and signals FFmpeg to write the result in the J2B container format — the ASYLUM Music Format wrapper used by Jazz Jackrabbit 2 — containing the LAME-encoded MP3 audio stream. |
Common Use Cases
- Extracting background music or sound effects from archived Jazz Jackrabbit 2 fan-made SWF animations or Flash games to repurpose them as J2B game audio assets.
- Recovering MP3 audio from old SWF multimedia presentations and repackaging it in J2B format for use in custom Jazz Jackrabbit 2 levels or mods.
- Salvaging audio from SWF-based interactive educational content from the Flash era and converting it into a format compatible with retro game audio toolchains that expect J2B.
- Creating custom J2B music files for Jazz Jackrabbit 2 level editors by sourcing audio from SWF animations that contain royalty-free or original compositions.
- Archiving audio content from Flash-era SWF files — which are no longer playable in modern browsers — into a stable, extractable format for game preservation projects.
- Testing J2B audio pipeline tooling by generating J2B output from easily accessible SWF source files during development of Jazz Jackrabbit 2 modding utilities.
Frequently Asked Questions
Yes, some quality loss is expected. Even though both SWF and J2B use MP3-based audio, the SWF audio stream is decoded and then re-encoded by the LAME encoder at 128k bitrate — this is a lossy-to-lossy transcode, which introduces generation loss. If your source SWF audio was already at 128k, the degradation is minimal but still present. To reduce quality loss, increase the output bitrate to 192k or 256k using the -b:a flag in the FFmpeg command.
J2B files produced by this tool use the libmp3lame codec wrapped in the J2B container structure, which aligns with what Jazz Jackrabbit 2 expects for its music format. However, J2B files originally designed for the game are rooted in the ASYLUM Music Format (a tracker-based format), so compatibility with the game's native player may vary depending on which version of JJ2 or which modding tools you are using. It's best to test the output with your specific JJ2 level editor or engine.
The video stream — whether encoded in FLV1 (Sorenson Spark) or MJPEG — is completely discarded. The -vn flag in the FFmpeg command explicitly instructs the encoder to produce no video output. The SWF's vector graphics, animations, and interactive elements are all ignored, and only the audio track is processed and written to the J2B file.
Replace the -b:a 128k portion of the command with your desired bitrate. J2B supports up to 320k, so for highest quality you can use: ffmpeg -i input.swf -vn -c:a libmp3lame -b:a 320k output.j2b. Keep in mind that since this is a lossy-to-lossy transcode from SWF, increasing the output bitrate beyond what the source SWF audio was encoded at will not recover lost detail — it just avoids adding further compression artifacts.
Yes. If the SWF file uses AAC as its audio codec, FFmpeg will decode it and re-encode the audio using libmp3lame for the J2B output. The conversion process handles both libmp3lame and AAC source audio from SWF transparently — the output will always be MP3-encoded audio in the J2B container regardless of whether the source was MP3 or AAC.
The single-file command shown on this page processes one file at a time, but you can batch process on your desktop using a shell loop. On Linux or macOS: for f in *.swf; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 128k "${f%.swf}.j2b"; done. On Windows Command Prompt: for %f in (*.swf) do ffmpeg -i "%f" -vn -c:a libmp3lame -b:a 128k "%~nf.j2b". The browser tool processes files individually, so the local FFmpeg command is especially useful if you have a large batch of SWF files to convert.
Technical Notes
SWF files store audio in either MP3 (via libmp3lame) or AAC format, and this tool extracts whichever audio stream is present and re-encodes it to MP3 at 128k for J2B output. The J2B format is a niche container tied specifically to the Jazz Jackrabbit 2 game engine; it wraps audio in a simple binary header derived from the ASYLUM Music Format, and its only supported codec in this pipeline is libmp3lame. Because J2B does not support metadata fields like title, artist, or album tags in any standard sense, no ID3 or other metadata from the SWF file is preserved in the output. SWF files do not support multiple audio tracks, so there is no ambiguity about which stream to extract. One known limitation is that if the SWF contains audio embedded at a very low bitrate (e.g., 64k), re-encoding to 128k will not improve perceptual quality — it will only produce a larger file with the same fidelity ceiling. For archival purposes, consider using the highest available output bitrate (320k) to minimize added compression artifacts from the double-encode. The browser-based tool handles files up to 1GB; for larger SWF archives, the displayed FFmpeg command can be run locally on any desktop with FFmpeg installed.