Extract Audio from MPEG to J2B — Free Online Tool

Extract audio from MPEG video files and save it as J2B, the ASYLUM Music Format-based audio used by Jazz Jackrabbit 2. The audio stream is re-encoded from MPEG's MP2 codec to MP3 (libmp3lame), producing a J2B file compatible with JJ2 modding and game audio toolchains.

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

MPEG files typically carry audio encoded in MP2 (MPEG-1 Audio Layer II), the standard codec for broadcast and DVD-era video. J2B is a niche game audio format used by Jazz Jackrabbit 2, built on the ASYLUM Music Format with a simple wrapper header. Because MP2 and MP3 are related but distinct codecs, FFmpeg cannot copy the audio stream directly — it must fully decode the MP2 audio from the MPEG container and re-encode it using the LAME MP3 encoder (libmp3lame) at the target bitrate. The video stream is discarded entirely with the -vn flag. The result is a J2B file containing an MP3 audio payload, which matches the codec expectation of the J2B format specification.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program. In the browser-based version of this tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — no data leaves your device.
-i input.mpeg Specifies the input MPEG file. FFmpeg will demux both the mpeg2video (or mpeg1video) and MP2 audio streams from the MPEG container; only the audio stream will be used.
-vn Disables video output entirely, stripping the mpeg1video or mpeg2video stream from the MPEG source. This ensures the J2B output contains only audio data, as the J2B format has no video component.
-c:a libmp3lame Selects the LAME MP3 encoder to transcode the MP2 audio from the MPEG file into MP3, which is the codec required by the J2B format specification. This re-encode step is necessary because MP2 and MP3 are distinct codecs that cannot be stream-copied between containers.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second for the J2B output. This is the default for J2B and is suitable for game background music; increase to 192k or 256k if the MPEG source has high-quality MP2 audio and fidelity is a priority.
output.j2b The output filename with the .j2b extension, which tells FFmpeg to write the audio into a J2B container — the ASYLUM Music Format wrapper used by Jazz Jackrabbit 2 to store its MP3-based music tracks.

Common Use Cases

  • Extracting a music or sound track from an MPEG video cutscene to create a J2B asset for a Jazz Jackrabbit 2 custom level or mod
  • Converting MPEG broadcast recordings of game footage into J2B format for use in JJ2 community-created episodes
  • Archiving MPEG audio content into J2B as part of a retro game audio preservation or fan project
  • Ripping the audio from a legacy MPEG promotional or demo video to repurpose it as in-game background music in a JJ2 mod
  • Testing J2B audio pipeline tooling by generating J2B files from known MPEG source material with predictable MP2-to-MP3 transcoding
  • Preparing audio assets from MPEG training or archival footage for integration into a JJ2-engine homebrew game

Frequently Asked Questions

MPEG files typically use MP2 (MPEG-1 Audio Layer II) as their audio codec, while J2B requires MP3 audio encoded with libmp3lame. These are different codecs — MP2 and MP3 are not interchangeable bitstreams despite their shared heritage. FFmpeg must fully decode the MP2 audio and re-encode it as MP3, which introduces a generation of lossy compression. There is no lossless path between MP2 and MP3.
J2B files produced by this tool contain an MP3 audio stream wrapped in a J2B header, which matches the format used natively by Jazz Jackrabbit 2 for its music tracks. However, JJ2 loads J2B files by filename convention and level configuration, so the file will need to be placed correctly within the game's directory structure and referenced by the appropriate level to be heard in-game. The audio content itself will be valid J2B.
Replace the value after -b:a in the command. For example, use -b:a 64k for a smaller file size at lower quality, or -b:a 320k for the highest MP3 quality. J2B supports bitrates of 64k, 128k, 192k, 256k, and 320k. The default used by this tool is 128k, which is a reasonable balance for game audio. For music tracks where fidelity matters, 192k or 256k is worth considering.
Both MP2 and MP3 are lossy codecs, so transcoding between them causes cumulative quality loss — the audio is decoded from a lossy format and re-encoded into another lossy format. At 128k MP3 the output will be noticeably different from the original MP2 audio, particularly in high-frequency detail. If your MPEG source was encoded at a high MP2 bitrate (e.g., 192k or 224k), transcoding to 128k MP3 will reduce quality; matching or exceeding the source bitrate with -b:a 192k or higher will minimize but not eliminate the degradation.
Yes. On Linux or macOS you can use a shell loop: for f in *.mpeg; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 128k "${f%.mpeg}.j2b"; done. On Windows Command Prompt: for %f in (*.mpeg) do ffmpeg -i "%f" -vn -c:a libmp3lame -b:a 128k "%~nf.j2b". This is especially useful when preparing multiple audio assets for a JJ2 mod with many levels.
No. The -vn flag instructs FFmpeg to ignore and discard all video streams entirely before any processing. The MPEG video codec (mpeg1video or mpeg2video) plays no role in the output — only the audio stream is decoded and re-encoded. The resulting J2B file contains audio data only, with no video payload.

Technical Notes

MPEG containers are a legacy broadcast and DVD-era format carrying video in mpeg1video or mpeg2video and audio most commonly in MP2, the codec standardized for MPEG-1 Audio Layer II. J2B is a highly specialized format unique to Jazz Jackrabbit 2, built on the ASYLUM Music Format (AMF) wrapped with a small proprietary header; despite its game-specific origin, its audio payload is standard MP3, making libmp3lame the correct and only supported encoder for this output. Because this conversion decodes lossy MP2 and re-encodes to lossy MP3, some fidelity is lost regardless of the output bitrate — this is unavoidable when transcoding between two different lossy codecs. The default output bitrate of 128k is appropriate for game background music but may sound thin for orchestral or high-dynamic-range source material; 192k is recommended for sources originally encoded at MP2 bitrates of 192k or above. MPEG files do not support multiple audio tracks, subtitles, or chapters, so no metadata of those kinds can be lost in conversion. Standard ID3 metadata from the MPEG audio stream is not guaranteed to transfer to J2B, as the J2B format's header structure does not include a standardized metadata block.

Related Tools