Convert ALAC to J2B — Free Online Tool

Convert ALAC audio files (.m4a) to J2B format, the proprietary game audio format used by Jazz Jackrabbit 2, by re-encoding the lossless Apple audio stream through the LAME MP3 encoder. This is a niche conversion that bridges Apple's lossless ecosystem with a retro game engine's audio pipeline.

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

ALAC (Apple Lossless Audio Codec) stores audio with perfect fidelity inside an MPEG-4 container — no audio data is discarded. During this conversion, FFmpeg decodes the ALAC stream fully to raw PCM audio, then re-encodes it using the libmp3lame encoder at 128kbps bitrate, producing an MP3-based audio stream wrapped in a J2B container. J2B is the audio format native to Jazz Jackrabbit 2, built on the ASYLUM Music Format with a simple identifying header. Because the output is lossy MP3 at 128kbps, some high-frequency audio detail present in the original ALAC file is permanently discarded during encoding — this is an irreversible quality reduction from lossless to lossy.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles the full pipeline of demuxing the ALAC stream from the MPEG-4 container, decoding it to raw PCM, and re-encoding it as MP3 inside a J2B output file.
-i input.m4a Specifies the input file — an .m4a container holding an ALAC lossless audio stream. FFmpeg reads the ALAC codec data from the MPEG-4 wrapper regardless of whether the file contains AAC or ALAC internally.
-c:a libmp3lame Instructs FFmpeg to encode the audio stream using the LAME MP3 encoder, converting the fully decoded ALAC PCM audio into a lossy MP3 bitstream suitable for wrapping in the J2B container.
-b:a 128k Sets the MP3 output bitrate to 128 kilobits per second, a standard quality level that balances file size and audio fidelity. Since the source is lossless ALAC, increasing this to 192k or 320k would better preserve the original audio detail at the cost of a larger file.
output.j2b Defines the output filename with the .j2b extension, signaling FFmpeg to write the encoded MP3 audio stream into a J2B container — the proprietary game audio format used by the Jazz Jackrabbit 2 engine.

Common Use Cases

  • Modding Jazz Jackrabbit 2 to replace in-game music tracks with custom audio sourced from Apple Music or iTunes purchases stored as ALAC files
  • Game audio enthusiasts and archivists converting lossless recordings of chiptune or retro-style music into J2B-compatible tracks for JJ2 level editors
  • Developers or modders creating custom JJ2 levels who have composed or recorded music in Apple's ecosystem and need to integrate it into the game engine
  • Retro gaming communities preparing audio assets from lossless ALAC collections for use in JJ2 community servers or fan-made level packs
  • Preservationists experimenting with J2B format compatibility by re-encoding reference-quality ALAC source material to study how the format handles standard MP3 audio

Frequently Asked Questions

Yes, this conversion is irreversibly lossy. ALAC is a lossless format that preserves every bit of the original audio, but J2B wraps an MP3 stream encoded here at 128kbps. The LAME encoder discards high-frequency content and applies psychoacoustic compression to reduce file size. The resulting audio is perceptibly close to the original for most listeners but is not bit-for-bit identical, and you cannot recover the lossless quality from the J2B output.
J2B is based on the ASYLUM Music Format with a proprietary header, and the Jazz Jackrabbit 2 engine expects this specific structure. While the internal audio stream is MP3-compatible, the J2B wrapper and header bytes must conform to what the game engine recognizes. Converting with FFmpeg produces the MP3-encoded audio content, but additional tooling specific to JJ2 modding may be required to properly construct a valid J2B file header that the game engine accepts.
No. J2B is a minimal game audio format with no support for standard metadata tags such as artist, album, or track title. The rich metadata that ALAC stores in its MPEG-4 container — including iTunes-compatible tags — is not carried over during conversion. The output J2B file will contain only the encoded audio stream and the format's basic header structure.
Modify the -b:a flag in the command to set a different constant bitrate. For example, use -b:a 320k for the highest MP3 quality and a larger file, or -b:a 64k for a much smaller file with noticeably reduced audio fidelity. Available options are 64k, 128k, 192k, 256k, and 320k. Since you are converting from a lossless ALAC source, using a higher bitrate like 192k or 256k will better preserve the detail present in the original recording.
Yes, you can adapt the command for batch processing in a shell script. On Linux or macOS, use a loop such as: for f in *.m4a; do ffmpeg -i "$f" -c:a libmp3lame -b:a 128k "${f%.m4a}.j2b"; done. On Windows Command Prompt, use a for loop with similar substitution syntax. The browser-based tool processes one file at a time, so the FFmpeg command approach is recommended when converting large collections.
The .m4a extension is used for both AAC and ALAC audio stored in an MPEG-4 container — the extension alone does not tell you which codec is inside. ALAC files are commonly distributed with the .m4a extension, particularly when purchased or ripped through iTunes or Apple Music. FFmpeg reads the actual codec stream inside the container regardless of the extension, so specifying -i input.m4a correctly handles ALAC-encoded content when the -c:a alac codec is present in the stream.

Technical Notes

ALAC files store audio at the original bit depth and sample rate (commonly 16-bit/44.1kHz for CD-quality, or higher for hi-res content), and the MPEG-4 container supports chapter markers which ALAC files may include. None of this structure survives conversion to J2B: chapters are dropped, bit depth is reduced as part of MP3 encoding, and the sample rate may be resampled depending on the LAME encoder's handling of the input. The libmp3lame encoder used here is the gold standard for MP3 encoding and produces high-quality output at 128kbps, but MP3 encoding introduces a small amount of silence padding at the start and end of the audio stream (encoder/decoder delay), which can be relevant for seamlessly looping game audio. If precise loop points are critical for JJ2 integration, you may need to trim the output or use gapless-aware tooling after conversion. J2B has no support for multiple audio tracks, subtitles, or transparency — all of which are irrelevant to ALAC audio but worth noting for completeness of format compatibility.

Related Tools