splitmastream is an application that reads an MPEG stream from stdin.
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.