3 ms·
Oh wow, original author here. Never thought this would ever be picked up by HN after 12 years... :) I lost the credentials for this account, so no fixes for thi
by sysop_ 5y ago
Oh wow, original author here. Never thought this would ever be picked up by HN after 12 years... :)
I lost the credentials for this account, so no fixes for this script. I hope it will inspire people to reverse engineer MP3, it was very interesting for back in the days.
I found some poorly documentation on the winamp website. And basically it comes down to this:
- you recode the MP3 to the lower bitrate
- get rid of all headers
- concatenate all audio into one big stream
- inject every x bytes a "StreamTitle=[title]" regardless of frames
Very simple format.
- pdenton 5y agoI really love the fact that there's no framework, no composer, no autoloading, just plain PHP. That's how you get the job done!
- apocalyptic0n3 5y agoWell, part of that is it predates Composer by a few years (and especially popular adoption of Composer). PEAR never really had the adoption that Composer did. The popularity of frameworks didn't soar until Composer was adopted by the community, either. And the overall application is actually fairly simple, assuming that getid3 folder is a third party library as it appears to be. That said, I'm not discounting anything done here. I've had to do deep dives on streaming video before. Even built my own h264 streaming protocol prior to HLS and DASH being introduced more than a decade ago now. Figuring out the format, finding obscure documentation on the file headers, figuring out how request and send it in pieces, hell just finding documentation that long ago... it's not easy. And at least when I did it, I was working on PHP 5.4 which had namespaces. This was likely built on 5.2 if I had a guess, which lacked that luxury
- modinfo 5y agoChanging bitrate does not work, do you know how to change bitrate of audio file? Now it always streams the file as it is, even if I change the bitrate to 1 in the settings, it streams the file as it is.