CptSkripto has asked for the wisdom of the Perl Monks concerning the following question:

Good morning all, I intend to build a perl daemon for personal use (home and office - no redistribution) to time shift live broadcasting of a European radio. I am on PDT while the radio is broadcasting on a CEST schedule. Moreover, the radio is broadcasting in Real Audio. Ideally, I would like to connect to this daemon and listen to broadcasting in "proper" time. What I mean is that the daemon will cache the last 9 hours of time difference and stream according to PDT time(i.e. if I connect at 08:33 PDT I would listen to what was broadcast at 08:33 CEST). I am now at the "research" phase and looking for "wisdom". TIA, CptSkripto

Replies are listed 'Best First'.
Re: Time Shifting a real player stream.
by Joost (Canon) on Aug 18, 2008 at 21:42 UTC
      Thank you for your reply. I have already "monked" around a mix of mplayer and a perl CGI. MPlayer successfully captures the stream and allows me (via -s) to skip to a specific time. This way I could retrieve the "request" time and forward to the "needed" time frame. The problem is how to re-stream the feed to the browser. Another alternative is to calculate how much of a file I should "cut-off" the head of the original file (it is a fixed 32kbps stream) and then serve the newly created file. Same thing can be done, per your suggestion, via recorded chunks. One hour or thirty minutes each and then use the CGI to create an on-the-fly play list. I will post progress on this thread. THX, CptSkripto
Re: Time Shifting a real player stream.
by zentara (Cardinal) on Aug 19, 2008 at 12:16 UTC
    The only thing I can think of is gstreamer. The good news is it has a Perl port, the bad news is it's relatively new, and hard to figure out. It does have a decent maillist where you might get an answer.

    I'm not really a human, but I play one on earth Remember How Lucky You Are
      oh yes. gstreamer is great. The perl documentation is a bit lacking, but it's not that hard with some experimenting to translate from the original API to the perl bindings - and it works very well.

      As always in these situations, looking at the examples and tests provided in the distribution can clear things up a lot.

      Thank you for the hint. I will investigate and keep this thread posted. THX. CptSkripto