Extract Audio from MKV to J2B — Free Online Tool
Extract audio from MKV video files and save it as J2B, the ASYLUM Music Format used by Jazz Jackrabbit 2. The MKV's audio stream is re-encoded using the LAME MP3 encoder (libmp3lame) at 128k bitrate, producing a J2B file that wraps an MP3 payload in the game's proprietary header structure.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MKV 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
MKV is a flexible container that can hold audio in many codecs — AAC, Opus, Vorbis, FLAC, and MP3 among others. Because J2B is specifically tied to the ASYLUM Music Format with an MP3 audio payload, FFmpeg must discard the video stream entirely (-vn), then transcode whatever audio codec is present in the MKV into MP3 using the libmp3lame encoder. The output is written with a .j2b extension, producing a file whose binary structure matches the simple J2B header wrapping expected by Jazz Jackrabbit 2's audio engine. If the source MKV already contains an MP3 audio track, the audio data is still re-encoded to ensure bitrate and format consistency rather than a lossless copy, since the J2B wrapper requires a specific structure.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the underlying engine that performs all media processing. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm), meaning your MKV file never leaves your device. |
-i input.mkv
|
Specifies the input file — your source MKV container. FFmpeg reads all streams from it, including any video, audio, subtitle, and chapter data the Matroska container holds, before filtering applies. |
-vn
|
Disables video output entirely, preventing any video stream from the MKV from being written to the J2B file. Since J2B is a game audio format with no video support, this flag is essential to produce a valid output. |
-c:a libmp3lame
|
Specifies the LAME MP3 encoder for the audio stream. J2B's ASYLUM Music Format structure wraps an MP3 payload, making libmp3lame the only appropriate codec for this conversion regardless of what audio codec the source MKV contains. |
-b:a 128k
|
Sets the MP3 audio bitrate to 128 kilobits per second. This is the default quality level for J2B output — sufficient for game background music while keeping file sizes compact for distribution in Jazz Jackrabbit 2 custom episode packages. |
output.j2b
|
The output filename with the .j2b extension. FFmpeg uses this extension to write the file in the J2B format — an ASYLUM Music Format audio file with a simple proprietary header, as expected by the Jazz Jackrabbit 2 game engine. |
Common Use Cases
- Creating custom background music for Jazz Jackrabbit 2 levels by extracting a composed or recorded soundtrack from an MKV video export out of a DAW screen recording
- Converting an MKV recording of a Jazz Jackrabbit 2 gameplay session's audio back into a J2B file to restore a lost game music asset
- Extracting audio from an MKV tutorial or fan-made video that showcases JJ2 music, converting it to J2B for use in community-made episode packs
- Archiving or recreating J2B music files from MKV video rips where the original .j2b assets are no longer accessible
- Producing J2B-compatible audio from an MKV containing a newly composed chiptune or retro-style track intended for a JJ2 custom level mod
Frequently Asked Questions
Yes, this conversion is lossy. Even if your MKV contains a lossless audio track such as FLAC, the output must be encoded as MP3 at 128k bitrate (by default) to conform to the J2B format's ASYLUM Music Format structure. MP3 encoding at 128k is generally considered acceptable quality for game audio but will introduce some compression artifacts compared to the original. You can increase the bitrate in the FFmpeg command to 192k or 320k to reduce quality loss.
J2B files produced by wrapping MP3 audio in the ASYLUM header format should be recognized by Jazz Jackrabbit 2's audio engine, but compatibility depends on the specific game version and any community patches or Plus versions in use. The J2B format is a proprietary game format and its header structure must be exact — FFmpeg's output with the .j2b extension creates a file matching this structure. Testing the output file in-game or with a community JJ2 tool is recommended before using it in a custom episode.
By default, FFmpeg selects the first audio track (track index 0) from the MKV when no specific stream is designated. J2B supports only a single audio track, so only one stream will be written to the output. If you want to extract a different audio track from a multi-track MKV, you can modify the FFmpeg command to add -map 0:a:1 (for the second audio track) before the output filename.
Replace the value after -b:a in the command with your desired bitrate. For example, use -b:a 320k for the highest MP3 quality, or -b:a 64k for a smaller file size more appropriate for simple game audio. The J2B format supports bitrates of 64k, 128k, 192k, 256k, and 320k. Higher bitrates produce better audio fidelity but larger file sizes, which may matter in the context of a JJ2 episode distribution package.
Yes, with a small shell script wrapping the command. On Linux or macOS you can run: for f in *.mkv; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 128k "${f%.mkv}.j2b"; done. On Windows Command Prompt, use: for %f in (*.mkv) do ffmpeg -i "%f" -vn -c:a libmp3lame -b:a 128k "%~nf.j2b". This is especially useful when preparing multiple music tracks for a custom JJ2 episode.
No. J2B is a pure audio format with no support for video, subtitles, chapters, or extended metadata. The -vn flag explicitly drops the video stream, and the J2B container has no mechanism to store anything beyond its basic ASYLUM Music Format audio payload. All video tracks, subtitle tracks, chapter markers, and embedded metadata from the MKV are discarded during conversion.
Technical Notes
J2B is an extremely niche game-specific audio format tied to Jazz Jackrabbit 2, built on the ASYLUM Music Format with a simple proprietary header. Unlike general-purpose audio containers, it has no provisions for metadata, multiple streams, or lossless encoding — the payload is always MP3, making libmp3lame the only applicable encoder. MKV is at the opposite end of the flexibility spectrum, capable of holding virtually any codec combination. Because the MKV audio track may be in AAC, Vorbis, Opus, FLAC, or MP3 form, transcoding to libmp3lame is always performed rather than stream-copying, ensuring the output conforms to J2B's expected audio format. The default 128k bitrate is a reasonable baseline for game audio but users targeting high-fidelity music tracks for custom JJ2 episodes should consider 192k or 320k. File sizes will be significantly smaller than the source MKV since all video data is stripped and only a compressed mono or stereo MP3 stream remains. There is no subtitle or chapter mapping possible in J2B, so any rich metadata present in the MKV source is completely lost.