I am living on the other side of the world from my home (GMT+1 now, GMT+13 is home), and I miss my old terrestrial radio station. It has a Shoutcast stream, and I would like to simply delay it by 12 hours so that it is always available when I want to listen to it, in a way that would make its timezone be synchronised to my timezone.
I envision this as a script being run on my server host.
A naive approach would simply be to allocate enough ram in a ringbuffer to store the entire 12 hour delay, and pipe in the output from streamripper. But the stream is a 128kbps mp3, which would mean (128/8) * 60 * 60 = ~56MB per hour, or 675MB for the whole 12 hour buffer, which isn't really so practical. Plus, i might have to deal with my server host just killing the process after a certain timeout.
So, what are some strategies that might actually be practical?
A stream ripper would be the Easy way, and probably the Right way, but if you want to do it the Programmer way....