Extract Audio from MP4 to J2B — Free Online Tool
Extract audio from an MP4 video and save it as a J2B file — the ASYLUM Music Format container used by Jazz Jackrabbit 2. This tool strips the video stream entirely and encodes the audio using the LAME MP3 encoder at 128k bitrate, producing a J2B file compatible with the game's audio system.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MP4 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
During this conversion, FFmpeg discards the MP4's video stream completely (no video decoding occurs) and focuses solely on the audio track. If the MP4 contains AAC audio (the default MP4 audio codec), that stream is decoded and then re-encoded using the LAME MP3 encoder into the lossy MP3 format. The resulting MP3 data is then wrapped in J2B's simple ASYLUM Music Format header structure. Because J2B is essentially an MP3-based format with a game-specific wrapper, the conversion is straightforward but does involve lossy transcoding — AAC audio decoded and re-encoded as MP3 introduces a small generation of quality loss even at the same bitrate.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm), so your MP4 file never leaves your device. |
-i input.mp4
|
Specifies the input file — your MP4 video. FFmpeg reads both the video and audio streams from this container, though only the audio will be used in the output. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore and discard the MP4's video stream. Since J2B is a pure audio format, no video data should be passed to the output, and this flag ensures none is. |
-c:a libmp3lame
|
Sets the audio encoder to LAME, the standard open-source MP3 encoder. J2B's ASYLUM Music Format is MP3-based, so libmp3lame is the only valid codec choice for this output format regardless of what audio codec the source MP4 used. |
-b:a 128k
|
Sets the MP3 audio bitrate to 128 kilobits per second, the default quality level for J2B output. This is a standard quality level suitable for game audio; you can raise it to 192k or 320k in the command for better fidelity at the cost of a larger file. |
output.j2b
|
Specifies the output filename with the .j2b extension, which tells FFmpeg to use the J2B muxer and wrap the encoded MP3 audio in the ASYLUM Music Format header expected by the Jazz Jackrabbit 2 game engine. |
Common Use Cases
- Replacing or modding the in-game music tracks in Jazz Jackrabbit 2 by converting MP4 video recordings or music videos into J2B audio files the game engine can load.
- Converting an MP4 recording of a chiptune or retro-style music performance into J2B format for use in JJ2 fan-made levels or community map packs.
- Extracting a custom music track from an MP4 and converting it to J2B so it can be bundled with a Jazz Jackrabbit 2 level file distributed to the JJ2 modding community.
- Preparing audio assets from MP4 video tutorials or Let's Play recordings for use in JJ2 level editors that accept J2B as the music format.
- Converting MP4 soundtrack rips from other retro games into J2B format for crossover mods or tribute levels built in the Jazz Jackrabbit 2 engine.
Frequently Asked Questions
Yes, this conversion is lossy in two ways. First, if your MP4 contains AAC audio (the most common MP4 audio codec), that audio must be decoded from AAC and re-encoded as MP3 — a process called transcoding. This introduces a small but real generation of quality loss, even at matching bitrates, because AAC and MP3 are both lossy codecs and each encoding step discards audio information. The default output bitrate is 128k, which is adequate for game audio but noticeably lower quality than a 320k encode.
J2B files are essentially MP3 audio wrapped in a simple ASYLUM Music Format header that Jazz Jackrabbit 2 expects. FFmpeg outputs the MP3 audio data correctly, but the J2B header structure must also conform to what the JJ2 engine expects. In practice, FFmpeg's j2b muxer applies the correct wrapper, but compatibility may depend on which version of the JJ2 engine or mod tools you are targeting. It is worth testing the output file in your specific JJ2 environment before finalizing a mod.
Yes. The audio bitrate is controlled by the -b:a flag in the FFmpeg command. You can increase it to 192k, 256k, or 320k by changing -b:a 128k to your preferred value, for example: ffmpeg -i input.mp4 -vn -c:a libmp3lame -b:a 320k output.j2b. Higher bitrates produce better-sounding output at the cost of larger file sizes. For game audio that will loop in JJ2, 192k is often a good balance between file size and perceptible quality.
By default, FFmpeg selects only the first (or best-ranked) audio track from the MP4 and encodes that single stream into the J2B file. The J2B format does not support multiple audio tracks, so any secondary audio streams — such as commentary tracks or alternate language dubs — are silently ignored. If you need a specific audio track other than the default, you can add -map 0:a:1 (for the second audio track) to the FFmpeg command before the output filename.
No. The J2B format is a minimal game audio container and does not support standard metadata tags such as title, artist, or album. Any ID3 or MP4 metadata present in the source file will be stripped during conversion. If metadata preservation is important to your workflow, consider also keeping the original MP4 or exporting a standard MP3 alongside the J2B file.
You can use a shell loop to process multiple files. On Linux or macOS, run: for f in *.mp4; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 128k "${f%.mp4}.j2b"; done. On Windows Command Prompt, use: for %f in (*.mp4) do ffmpeg -i "%f" -vn -c:a libmp3lame -b:a 128k "%~nf.j2b". This processes every MP4 in the current directory and outputs a corresponding J2B file with the same base filename.
Technical Notes
J2B is an obscure, game-specific audio format tied to Jazz Jackrabbit 2, built on the ASYLUM Music Format with an MP3 audio payload. Because J2B only supports the MP3 codec (via libmp3lame), any MP4 audio codec — whether AAC, Opus, or MP3 — must be transcoded rather than stream-copied. This means a lossless passthrough is not possible in this conversion pipeline. The -vn flag ensures zero video processing overhead, which makes conversion fast even on large MP4 files since only the audio stream is decoded and re-encoded. The J2B format carries no subtitle, chapter, or metadata support, so any of those assets present in the MP4 container will be dropped. File sizes for J2B output will typically be much smaller than the source MP4 since only the audio remains, and at 128k MP3 a typical 3-minute track occupies roughly 2.8MB. If your source MP4 already contains MP3 audio (encoded with libmp3lame), you could theoretically attempt stream copy with -c:a copy, but the J2B container may not accept a bare MP3 stream without re-muxing, so re-encoding with libmp3lame remains the safest approach.