Thursday, June 18, 2009

iView RSS feed


iView RTMP streams are unmetred for some Australian ISPs. It would be nice to be able to save these RTMP streams automatically with software like Miro or iTunes. The program information is published as XML, which can be converted to an RSS feed easily enough. But to actually grab the RTMP stream requires special software.

My basic solution:
- Install Tomcat 5.5 and enable the cgi servlet, configure 'executable' to be 'bash'.
- Deploy Exist onto the Tomcat (and locked down the admin account).
- Copy an XQuery script into Exist that fetches the XML file and generates RSS.
- Wrap the rtmpdump binary with a cgi script that does the HTTP handling and grabs an iView authentication token.

End result: I can subscribe to iView RTMP streams in my video rss client of choice (ie Miro).



Kudos to some guys on Whirlpool for publishing scripts that do some CLI rtmpdumping of iView. The IP addresses they use work for me, but different ISPs probably need different IP addresses.

And the two scripts are iview.xql and iviewdump.cgi

4 comments:

Peter Thomas said...

I'm the author of Flazr [ http://flazr.com ] which you mentioned trying in this post:

http://forums.whirlpool.net.au/forum-replies.cfm?t=1212283&p=9#r177

Just curious to know what kind of problems you had trying to combine Flazr with Tomcat / Jetty.

Matt said...

Hi Peter,

I managed to get Flazr downloading the RTMP stream by adapting one of the groovy scripts. Doing this helped me realise that RtmpClient was the Java class I needed to use.

I then went about binding the RtmpClient from an XQuery script. The problems I encountered were:

a. The application server would disappear whenever I used RtmpClient. I tracked this down to line 74 - System.exit(0).

b. A simple way to output the stream to the HTTP client was not obvious to me.

c. Modifying the tcUrl in the parameters wasn't working from XQuery. I tried several ways to manipulate the Map, but I would end up with 2 tcUrls in the Map. This seems likely to be a problem with how I bind Java classes from eXist.

I would have preferred to use Flazr for this task (maintained code, cross platform, etc). And your work seems great. But in the end it was easier for me to use rtmpdump via CgiServlet, mostly because I took the path of minimal effort.

Peter Thomas said...

Thanks Matt, this information helps, I'll see what can be improved in future releases. Good to know you have a working solution with "rtmpdump".

Anonymous said...

Thanks for sharing nice information with basic solution. I like the way of information which you listed here. So everyone can easily understand it. Thanks for this nice post here.

carte memoire