Extract Audio from MPG to J2B — Free Online Tool

Extract audio from MPG video files and save it as J2B format, the ASYLUM Music Format container used by Jazz Jackrabbit 2. The MPG's default MP2 audio stream is transcoded to MP3 via the LAME encoder and wrapped in a J2B-compatible output.

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

MPG files (MPEG-1/MPEG-2 video containers) typically carry MP2 audio alongside their video streams. This tool strips the video entirely using the -vn flag and transcodes only the audio track — re-encoding it from MP2 to MP3 using the libmp3lame encoder at 128k bitrate. The resulting audio data is written with a .j2b extension, matching the file structure expected by Jazz Jackrabbit 2's ASYLUM Music Format wrapper. Because MP2 and MP3 are both lossy formats, this is a lossy-to-lossy transcode, meaning some additional generational quality loss is introduced compared to transcoding from a lossless source.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool. In the browser this runs via FFmpeg.wasm (WebAssembly), behaving identically to the desktop binary so the same command works locally on your machine.
-i input.mpg Specifies the input MPG file — an MPEG-1 or MPEG-2 video container that typically carries MP2 audio alongside its video stream.
-vn Disables video output entirely, discarding the MPEG-1/2 video stream from the MPG so that only the audio track is processed and written to the J2B file.
-c:a libmp3lame Transcodes the audio using the LAME MP3 encoder, converting the MPG's MP2 (or other) audio stream into MP3, which is the audio format expected inside a J2B container.
-b:a 128k Sets the MP3 output bitrate to 128 kilobits per second, matching the default audio quality level for J2B and producing file sizes appropriate for Jazz Jackrabbit 2 game asset use.
output.j2b The output filename with the .j2b extension, signaling that the encoded MP3 audio should be wrapped as a Jazz Jackrabbit 2 ASYLUM Music Format file for use in the game or its level editor.

Common Use Cases

  • Extracting background music or sound effects from MPG video recordings of Jazz Jackrabbit 2 gameplay to create custom J2B audio assets for modded game levels
  • Pulling audio from MPG broadcast or VCD footage to repurpose as in-game music tracks in JJ2 level editors like JCS (Jazz Creation Station)
  • Converting an archived MPEG-2 video's soundtrack into a J2B file for use in Jazz Jackrabbit 2 fan-made episode packs
  • Isolating commentary or narration audio from an MPG capture of JJ2 gameplay to produce a standalone J2B audio clip for community sharing
  • Batch-processing MPG cutscene files from a VCD or DVD rip to extract their audio streams as J2B tracks for integration into a JJ2 mod project
  • Reproducing the exact FFmpeg command locally to process large MPG files over 1GB that exceed browser-based tool limits

Frequently Asked Questions

Yes. MPG files typically use MP2 audio, which is already a lossy codec. Transcoding MP2 to MP3 (libmp3lame) introduces a second round of lossy compression, sometimes called generational loss. At 128k bitrate the result is generally acceptable for game audio use, but artifacts may be more noticeable than if you were encoding from a lossless source like WAV or FLAC.
J2B is a proprietary audio container used exclusively by Jazz Jackrabbit 2, built around the ASYLUM Music Format with a simple header wrapping the audio data. Standard media players like VLC or Windows Media Player will not recognize the .j2b extension. The format is intended for use within the JJ2 game engine or compatible level editors, not for general playback.
No. The video stream in the MPG file is completely discarded by the -vn flag and plays no role in the audio output. Only the audio track is read and re-encoded. However, if the original MPG was encoded at a very low audio bitrate, the source quality ceiling will limit the output regardless of the target bitrate chosen.
Replace the 128k value in the -b:a 128k flag with your preferred bitrate. J2B supports 64k, 128k, 192k, 256k, or 320k. For example, use -b:a 192k for slightly higher fidelity game audio. Keep in mind that higher bitrates increase file size and that the practical quality ceiling is still limited by the lossy MP2 source from the MPG.
Yes, on the command line you can use a shell loop to process multiple files. On Linux or macOS: for f in *.mpg; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 128k "${f%.mpg}.j2b"; done. On Windows PowerShell: Get-ChildItem *.mpg | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a libmp3lame -b:a 128k ($_.BaseName + '.j2b') }. The browser tool processes one file at a time.
Yes. FFmpeg detects the actual audio codec in the MPG container automatically, so whether the source audio is MP2, MP3, or AAC, the -c:a libmp3lame flag will transcode it to MP3 for the J2B output regardless. No changes to the command are needed.

Technical Notes

MPG containers following the MPEG-1 and MPEG-2 standards most commonly carry MP2 (MPEG-1 Audio Layer II) audio, though some encoders embed MP3 or AAC streams. J2B expects audio wrapped in ASYLUM Music Format conventions with MP3-encoded content, making libmp3lame the only viable codec for this output. Because both source and destination formats are lossy, users should avoid multiple round-trip conversions as quality degrades cumulatively. The default 128k bitrate is consistent with the original JJ2 game's audio expectations and keeps file sizes small for game asset use. FFmpeg writes the output file with a .j2b extension without any game-specific metadata header manipulation, so compatibility with JJ2's level editor depends on the target application's tolerance for a plain MP3 bitstream under the J2B wrapper. No subtitle, chapter, or secondary audio track data from the MPG is preserved, as J2B supports none of these features.

Related Tools