by tombert · 1y ago · 0 comments
I store the chunks in a custom-built database (on top of riak_core and Bitcask), and I have it automatically also make an HLS stream as well. This involved remuxing the AAC chunks into MPEG-TS and dynamically create the playlist.
It's also horizontally scalable, almost completely linearly. Everything is done with Erlang's internal messaging and riak_core, and I've done a few (I think) clever things to make sure everything stays fast no matter how many nodes you have and no matter how many concurrent streams are running.
I’ll probably release the code I wrote for the input radio station but that’s just a glorified script written in Rust and calling FFmpeg. The only fun part of that is I call OpenAI to get AI commercials and DJ chatter.