Extract Audio from AVI to J2B — Free Online Tool

Extract audio from AVI video files and save it as a J2B file using the LAME MP3 encoder — the same audio codec used by Jazz Jackrabbit 2's native music format. The video stream is discarded entirely, producing a lightweight audio-only output compatible with the J2B container's ASYLUM Music Format wrapper.

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

AVI files store interleaved audio and video data in a single container, often using MP3 (libmp3lame) as the audio codec alongside video streams encoded in H.264, MJPEG, or PNG. During this conversion, FFmpeg reads the AVI container, ignores the video stream entirely using the -vn flag, and re-encodes (or passes through) the audio using the LAME MP3 encoder at 128k bitrate. The output is written into a J2B container — a format native to Jazz Jackrabbit 2 that wraps ASYLUM module music data with a simple header. Because J2B only supports a single audio track and uses MP3 encoding exclusively, any secondary audio tracks present in the AVI source are dropped, and the primary audio stream is encoded to MP3 regardless of its original codec.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary to begin processing. In the browser-based tool, this runs via FFmpeg.wasm compiled to WebAssembly, executing entirely client-side with no server involvement.
-i input.avi Specifies the input AVI file. FFmpeg reads the RIFF-based AVI container and identifies all available streams — typically an H.264 or MJPEG video stream and an MP3 or AAC audio stream — before applying the conversion instructions.
-vn Disables video output entirely, telling FFmpeg to ignore all video streams in the AVI file. Since J2B is a pure audio format, no video data is written — this flag ensures the video stream is discarded without consuming any encoding resources.
-c:a libmp3lame Encodes the extracted AVI audio using the LAME MP3 encoder, which is the only audio codec supported by the J2B container format. Even if the source AVI already contains MP3 audio, re-encoding ensures the output conforms to J2B's audio requirements.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second, which is the default quality level for J2B output. This produces a reasonable balance between file size and audio fidelity for game audio use cases; increase to 192k or 320k for higher quality.
output.j2b Defines the output filename and signals FFmpeg to use the J2B muxer, which wraps the encoded MP3 audio in the Jazz Jackrabbit 2 container format including its required binary header structure.

Common Use Cases

  • Extracting background music or sound effects from AVI game cutscenes or demos to repurpose as J2B assets for Jazz Jackrabbit 2 custom levels or mods
  • Converting AVI recordings of Jazz Jackrabbit 2 gameplay sessions into J2B files to isolate and archive the in-game audio
  • Stripping audio from legacy AVI multimedia files produced by older Windows-era tools to create standalone MP3-based J2B audio assets for retro game projects
  • Preparing audio content from AVI source videos for use in JJ2 fan-made levels that require J2B-formatted music files
  • Archiving audio tracks from AVI files in a game-native J2B container for retro gaming preservation projects focused on the Jazz Jackrabbit 2 ecosystem
  • Quickly discarding video data from large AVI files to produce compact J2B audio files suitable for embedding in Jazz Jackrabbit 2 episode packages

Frequently Asked Questions

Yes, this conversion is lossy. The audio is encoded using the LAME MP3 encoder at 128k bitrate regardless of the original AVI audio codec. If the AVI already contains MP3 audio, the stream is still re-encoded rather than copied directly, because the J2B container requires a specific format wrapping that FFmpeg handles through re-encoding. If audio quality is critical, consider increasing the bitrate in the FFmpeg command to 192k or 320k.
J2B files are designed around the ASYLUM Music Format, which was built for the mono or stereo module-style music of Jazz Jackrabbit 2. FFmpeg will encode the extracted AVI audio as stereo MP3 by default if the source is stereo. However, playback behavior within the actual Jazz Jackrabbit 2 engine depends on how the game reads the J2B header and audio data, so results may vary for content not originally composed for the game.
J2B does not support multiple audio tracks — it is a single-track format. FFmpeg will extract only the first (default) audio track from the AVI file and encode it to MP3 for the J2B output. Any secondary audio tracks, such as commentary or alternate language dubs, will be silently dropped. If you need a specific non-default track, you can modify the FFmpeg command to add '-map 0:a:1' (or another index) before the output filename.
Replace the '-b:a 128k' flag value with your preferred bitrate. Supported options for J2B output include 64k, 128k, 192k, 256k, and 320k. For example, to get higher-fidelity audio, use '-b:a 320k' in the command. Keep in mind that J2B is primarily a game audio format and higher bitrates may not be meaningful depending on how the Jazz Jackrabbit 2 engine reads the file.
Yes, on the command line you can use a shell loop to process multiple files. On Linux or macOS, run: 'for f in *.avi; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 128k "${f%.avi}.j2b"; done'. On Windows Command Prompt, use: 'for %f in (*.avi) do ffmpeg -i "%f" -vn -c:a libmp3lame -b:a 128k "%~nf.j2b"'. The browser-based tool processes one file at a time, but the displayed FFmpeg command is designed for easy reuse locally.
Not exactly. J2B is a distinct container format associated with Jazz Jackrabbit 2 that wraps audio data (originally ASYLUM module music) with a specific binary header. FFmpeg writes to the .j2b extension and applies the appropriate container structure using the libmp3lame codec internally. Simply renaming an MP3 to .j2b will not produce a valid J2B file, as the header data would be missing or incorrect for the game to parse it properly.

Technical Notes

J2B is an exceptionally niche audio format tied specifically to Jazz Jackrabbit 2, originally designed to wrap ASYLUM Music Format module data rather than raw MP3 streams. FFmpeg's J2B muxer handles the container header requirements, but the format's intended use case — tracker-style module music — differs significantly from typical MP3 audio extracted from AVI video. AVI itself is a legacy Microsoft container (RIFF-based) that supports multiple interleaved audio and video streams, but lacks modern features like chapters or subtitle tracks. The default audio codec in AVI is MP3 (libmp3lame), which aligns with J2B's own audio codec requirement, though FFmpeg still re-encodes rather than stream-copying because the container framing differs. Metadata present in the AVI file (title, artist, etc.) is unlikely to be preserved in the J2B output given the format's limited metadata support. The -vn flag ensures zero video processing overhead, making the conversion fast even for large AVI files. Users processing files over 1GB should use the displayed FFmpeg command locally rather than the browser tool, as WebAssembly memory constraints may limit very large file handling.

Related Tools