Rtmpdump "proxy"
#1
Hi all,

based on Phil Lewis' get_iplayer.cgi code, which is used as a workaround in the iPlayer plugin, I created a stripped down version of his webserver to allow for forwarding streams acquired by rtmpdump through HTTP.
The code is currently a mess. Still a lot of remaining code from get_iplayer.cgi and probably there could be something done to announce the proper stream format.
I think this could be helpful to get instant access to advances in rtmpdump for plugins.

Just execute and then point your browser/XBMC to the IP address of your machine like this:

http://[ip]:1935/iplayer?ACTION=stream&rtmp=[rtmp_url]&swfUrl=[swfUrl]&pageUrl=[pageUrl]&playpath=[playpath]

The URLs in the call should be urlencoded. This can be done through (urllib.quote) in Python. You need a current rtmpdump in "/usr/bin".

The code can be found here:

http://gitorious.org/rtmp_proxy/rtmp_proxy

mighty_bombero
Reply
#2
The rtmpgw program provided in the rtmpdump package can already do this.

Run rtmpgw on some machine "proxy", then send a regular HTTP request to it:

http://proxy/?r=rtmpurl&W=swfurl&p=pageurl&y=playpath
Reply
#3
highlandsun Wrote:The rtmpgw program provided in the rtmpdump package can already do this.

Run rtmpgw on some machine "proxy", then send a regular HTTP request to it:

http://proxy/?r=rtmpurl&W=swfurl&p=pageurl&y=playpath


What would the values of

rmtpurl , swfurl, pageurl, and pagepath be for a justin.tv channel ?
Reply
#4
johoja Wrote:What would the values of

rmtpurl , swfurl, pageurl, and pagepath be for a justin.tv channel ?

Not relevant to this thread. Start a new thread somewhere else if you want to discuss that.


Note that using the proxy approach has a distinct disadvantage - the actual RTMP stream supports seeking, the proxy doesn't.
Reply
#5
Hi all,

I'm now playing with rtmpgw but I cannot manage to convince XBMC to play from the URL. Has anybody had success with that in the past and could lend some insight?

I'm trying the following:

xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play('http://192.168.5.3:1935/')

I had also tried to add to a playlist and then play before.

The initialized rtmpgw works fine when using VLC to play back.

rtmpgw gives the following output on connect:

processTCPrequest: No request header received/unsupported method

XBMC log ouptput:
http://pastebin.com/RBUvnG5V

Thanks.
Reply
#6
Dunno what you're doing, but this works for me

Code:
import xbmc, xbmcgui

rtmp_url="http://localhost:1600/?r=rtmp%3a%2f%2ffms.scctv.net%2fannenberg%2f%2fvod%2fworld_of_chemistry_01&s=http%3a%2f%2fwww.learner.org%2fvod%2fswfs%2fplayer-licensed.swf&p=http%3a%2f%2fwww.learner.org%2fvod%2fvod_window.html%3fpid=793"
item = xbmcgui.ListItem("RTMPLocal")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(rtmp_url, item)
Reply
#7
Hi highlandsun,

the Annenberg stream plays just fine. However the stream from Hulu doesn't. Could this be a timeout issue? Another batch of logs:

XBMC:

http://pastebin.com/V2DhVFFL

rtmpgw:

http://pastebin.com/VDXFzzK4

As you can see it seems to connect fine. Taking the URL generated from the script I can launch the stream in VLC just fine. Invocation is done just like in your example.

mighty_bombero
Reply
#8
Yes, from your log it looks like XBMC is timing out the HTTP connection too soon.
Reply

Logout Mark Read Team Forum Stats Members Help
Rtmpdump "proxy"0