
How a Minecraft mod led me to build my own Java media library from scratch
I was building a Minecraft mod — one that could play MP3 files directly through OpenAL instead of using Minecraft's built-in audio API. To stream audio that way, I needed something that could decode MP3 at a low level. I like digging into obscure or old-school tools, so I found Zoom JLayer — a pure-Java MP3 decoder from the early 2000s. It looked perfect. Except it only worked on some MP3 files. That bugged me. Same extension. Same player. Completely different behavior. So I dug into JLayer's source code (someone had dumped it on GitHub) and saw something I'd never really thought about before — MP3 files aren't all the same. There are different bitrate modes — CBR, VBR — frame headers, side information, and other structures hidden inside the bytes. That sent me down a rabbit hole. Where do these values actually come from? Turns out — the bytes themselves. Once I started reading raw bytes directly, I couldn't stop. I began studying how media file formats work at the byte level. At the t
Continue reading on Dev.to
Opens in a new tab



