Convert SWF to J2B — Free Online Tool

Extract and convert the audio track from an Adobe Flash SWF file into J2B format, the ASYLUM Music Format used by Jazz Jackrabbit 2, encoded with the LAME MP3 codec at 128k bitrate. This is a niche but precise conversion for retro game audio enthusiasts who need SWF-sourced audio repackaged in the J2B container.

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 as MP3 (via libmp3lame) or AAC alongside Flash vector animation and interactive content. During this conversion, FFmpeg demuxes the SWF container to extract the audio stream, discards any video, vector graphic, or interactive data entirely, and re-encodes the audio using the LAME MP3 encoder at 128k bitrate, then wraps the result in the J2B container. J2B is a minimal format — essentially the ASYLUM Music Format with a simple header — originally designed for module-style game music in Jazz Jackrabbit 2. Because both SWF and J2B use lossy MP3 encoding, this conversion involves a lossy-to-lossy transcode, which means some generational audio quality loss is unavoidable.

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 SWF-to-J2B conversion pipeline.
-i input.swf Specifies the input SWF file. FFmpeg's SWF demuxer will parse the Flash container and identify available audio streams — typically MP3 or AAC — while ignoring the vector graphic and scripting layers.
-c:a libmp3lame Sets the audio encoder to LAME MP3, which is the only audio codec supported by the J2B format. Any audio found in the SWF — whether originally MP3 or AAC — will be encoded through LAME before being written into the J2B container.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second for the J2B output. This is the default quality setting and provides a reasonable balance between file size and audio fidelity for this lossy-to-lossy transcode.
output.j2b Specifies the output filename and triggers FFmpeg to use its J2B muxer, which wraps the LAME-encoded MP3 stream in the simple header structure expected by the Jazz Jackrabbit 2 ASYLUM Music Format container.

Common Use Cases

  • Extracting background music or sound effects from legacy Flash games or animations to repurpose as Jazz Jackrabbit 2 custom level audio
  • Game modders building custom J2B music packs who have sourced audio from archived SWF Flash content on the web
  • Retro gaming archivists converting Flash-era game audio into formats compatible with JJ2 community tools and level editors
  • Developers of Jazz Jackrabbit 2 fan projects who want to incorporate music originally composed or distributed as Flash animations
  • Audio hobbyists experimenting with obscure game audio formats and using SWF files as a convenient source of pre-encoded MP3 streams
  • Preservationists creating J2B audio assets from SWF-based multimedia presentations before Flash content becomes inaccessible

Frequently Asked Questions

Yes, some quality loss is expected. SWF files typically store audio as MP3 at varying bitrates, and this conversion re-encodes that audio through the LAME encoder targeting 128k bitrate output. Going from one lossy format to another — even within the same codec family — introduces generational loss. If the original SWF audio was encoded at a lower bitrate than 128k, the output may not sound noticeably worse, but if it was higher quality, some fidelity will be lost in the transcode.
Not directly. SWF files can contain MP3 audio (via libmp3lame) or AAC audio, but J2B only supports MP3 encoding via libmp3lame. This tool handles both cases by routing all audio through the LAME encoder, so AAC audio from an SWF will be transcoded to MP3 before being placed in the J2B container. Additionally, J2B does not support multiple audio tracks, chapters, or subtitles, so only the primary audio stream from the SWF will be converted.
All of it is discarded. FFmpeg extracts only the audio stream from the SWF file; the vector graphics, scripting layers, animation timelines, and any interactive ActionScript content are not transferred to J2B because the format has no capability to store them. J2B is a pure audio container designed exclusively for game music playback, so the output will contain only audio.
Replace the value after -b:a in the command with your preferred bitrate. J2B supports 64k, 128k, 192k, 256k, and 320k. For example, to get higher quality output, use '-b:a 192k' or '-b:a 320k'. Keep in mind that increasing the bitrate beyond the quality of the original SWF audio will not recover lost detail — it will just produce a larger file. To lower file size at some cost to quality, try '-b:a 64k'.
The displayed command processes one file at a time, but you can batch process on your desktop using a shell loop. On Linux or macOS, use: 'for f in *.swf; do ffmpeg -i "$f" -c:a libmp3lame -b:a 128k "${f%.swf}.j2b"; done'. On Windows Command Prompt, use a for loop with the equivalent syntax. This is especially useful for converting entire archives of Flash content in one pass.
J2B files created from arbitrary MP3 audio sources may not behave identically to original Jazz Jackrabbit 2 music files, which were based on the ASYLUM tracker module format with specific looping and sequencing metadata. FFmpeg will produce a J2B-wrapped MP3 stream, but the file may lack the module-specific headers and loop point data that JJ2's engine expects for seamless in-game playback. Community tools like the JJ2+ patch or ModPlug-based players may handle these files differently than the original game engine.

Technical Notes

SWF files are compound containers that bundle vector graphics, ActionScript bytecode, and media streams — FFmpeg's SWF demuxer can access the embedded audio streams but has no capability to interpret or transcode the Flash-specific animation and scripting layers. The audio found in SWF files is most commonly MP3 encoded with libmp3lame, though AAC is also possible in later SWF versions. J2B is an extremely narrow format: it wraps the ASYLUM Music Format, which was originally a tracker-based module format used by Jazz Jackrabbit 2 in the late 1990s. FFmpeg's J2B muxer places an MP3 stream inside this wrapper, but genuine ASYLUM files contain pattern-based sequencer data rather than a continuous PCM or MP3 stream. This means the resulting J2B file is technically valid as an MP3-in-J2B container but is not equivalent to an original ASYLUM tracker module. No metadata from the SWF — such as title tags or stream identifiers — is preserved in the J2B output, as the format does not support rich metadata fields. Users who need loop points or precise timing for game integration should consider editing the J2B header with game-specific tools after conversion.

Related Tools