Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (http://stream-recorder.com/forum/forumdisplay.php?f=4)
-   -  

Download streams from Seeon.tv

(http://stream-recorder.com/forum/showthread.php?t=8792)

Eldorado 04-11-2011 05:52 PM

Download streams from Seeon.tv


 
I'm having trouble parsing out the proper rtmp link from the html from channels on this site - _www.seeon.tv

In the end I would like to write a script against the site to automatically pull the rtmp links and play them in XBMC

I am able to get it to download fine with rtmp dump with the following:
Code:

rtmpdump -r "rtmp://live4.seeon.tv/edge" -y "0icej868dte1vdx" -W "http://www.seeon.tv/jwplayer/player.swf" -p "http://www.seeon.tv/view/161/Comedy_Guy" -o test.flv
The values from which I easily pulled from CooJah:
Code:

url: rtmp://live4.seeon.tv/edge/0icej868dte1vdx
app: edge
flashVer: WIN 10,1,85,3
pageUrl: http://www.seeon.tv/view/161/Comedy_Guy
swfUrl: http://www.seeon.tv/jwplayer/player.swf
tcUrl: rtmp://live4.seeon.tv/edge
playPath: 0icej868dte1vdx

Though the html from the website shows me this for the rtmp url
From page -
Code:

http://www.seeon.tv/view/161/Comedy_Guy
Code:

<object width="640" height="480" id="dplayer" type="application/x-shockwave-flash" data="http://www.seeon.tv/jwplayer/player.swf">
<param name="movie" value="http://www.seeon.tv/jwplayer/player.swf"></param>
<param name="allowscriptaccess" value="always"></param>
<param name="wmode" value="opaque"></param>
<param name="allowfullscreen" value="true"></param>
<param name="flashvars" value="&streamer=rtmp%3A%2F%2Flive00.seeon.tv%2Fredirect&file=0icej868dte1vdx.flv&autostart=true"></param>
<embed name="dplayer" wmode="opaque" src="http://www.seeon.tv/jwplayer/player.swf" width="640" height="480" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" flashvars="&streamer=rtmp%3A%2F%2Flive00.seeon.tv%2Fredirect&file=0icej868dte1vdx.flv&autostart=true" /></embed>
</object>

I'm still learning and trying to figure out how the above html translates into what Coojah (and others) shows me - and works

Notice how the RTMP url is different:
Code:

rtmp://live00.seeon.tv/redirect
I tried running the link thru RTMPexplorer and the rtmpdump command it attemped, and failed, on basically what I would have used based on what I see in the html:
Code:

rtmpdump -r "rtmp://live00.seeon.tv/redirect" -a "redirect" -f "WIN 10,0,45,2" -W "http://www.seeon.tv/jwplayer/player.swf" -p "http://www.seeon.tv/view/161/Comedy_Guy" -y "0icej868dte1vdx" -o 0icej868dte1vdx.flv
So can anyone give me some help on how the rtmp url translates? Can I find this out via scripting, or is a sniffer app required?

Is there something in the html that I'm missing?

KSV 04-12-2011 12:21 AM

Re: Download streams from Seeon.tv


 
It's simple. when you use the rtmp parameters from html server sends a 302 redirect AMF packet which contains the new url.

Code:

Property: <Name:              level, STRING:    error>
Property: <Name:              code, STRING:    NetConnection.Connect.Rejected>
Property: <Name:        description, STRING:    Connection failed: Application rejected connection.>
Property: <Name:                ex, OBJECT>
Property: <Name:          redirect, STRING:    rtmp://live4.seeon.tv:1935/edge>
Property: <Name:              code, NUMBER:    302.00>

Use this URL instead of original URL to download successfully with rtmpdump. rtmpdump doesn't handle redirects automatically.

Eldorado 04-12-2011 08:08 AM

Re: Download streams from Seeon.tv


 
Ah crap, the word "redirect" in that link didn't ring a bell for me the first time :)

Is that output from your rtmpdump?

I'm looking for a way to capture this redirected url via a script, any tips?

KSV 04-12-2011 08:42 AM

Re: Download streams from Seeon.tv


 
Most probably it returns the same host and app parameter for all urls. if it is the case then use these two parameters statically and parse other parameters from html file. if server returns different url for other streams then parse the output of rtmpdump to get host and app parameter.

if you know programming it will be better to modify rtmpdump to handle redirects automatically. :)

Eldorado 04-12-2011 08:54 AM

Re: Download streams from Seeon.tv


 
It seems to be possibly random in the url's it redirects to, but still fairly static

rtmp://live#.seeon.tv:1935/edge

Where the # seems to vary between 1-7 and any # in that range seems to work at all times no matter what the redirect returns

I just hate hard coding and hoping to find a dynamic way of grabbing it

Now modifying rtmpdump.. hmm... :)

chap 04-12-2011 09:11 AM

Re: Download streams from Seeon.tv


 
Quote:

Originally Posted by Eldorado (Post 27359)
I

I just hate hard coding and hoping to find a dynamic way of grabbing it

can rtmpsusk help you with this?

Eldorado 04-12-2011 02:35 PM

Re: Download streams from Seeon.tv


 
Quote:

Originally Posted by chap (Post 27360)
can rtmpsusk help you with this?

I'm not sure how I would be able to make use of it?

My goal is developing a python script to be used in XBMC, which uses librtmp to play the streams

Unless there is a way to make it handle the redirect automatically, or detect the redirect url via my script before attempting to play.. I think I'm stuck with hardcoding


All times are GMT -6. The time now is 01:20 AM.