splitmastream reads an MPEG stream from stdin, writes a copy of it to a file named YYMMDD.HH-streamname.mp3 and then writes the stream to stdout. Think of it as a hourly-file-cutting 'tee' for MPEG audio. Files are switched on every hour at a frame boundary so that every file should be playable without noise at the beginning/end.
splitmastream is useful for making an archive of an mpeg stream which is, for example, coming from an encoder and going to an icecast transmitter.
Tested on various RedHat Linux distributions, but should compile (with maybe a couple trivial #include changes) on any modern Unix-like operating system. I have only used it on 56kbit/s, 128kbit/s and 192kbit/s CBR layer3 streams but others should work as well.
As usual, if it breaks, you get to keep both pieces.
Compiling the application like this:
this results in the 'splitmastream' binary, hopefully.