RTMP Redirects
#1
I'm having all sorts of fun learning writing addons and the whole world of streaming.. so yet another question Smile

I have a RTMP stream that does a redirect, is there any way to check and handle this via script?

Here's a snip from my log file where you see the redirect url reported but obviously not handled:
Code:
85184  NOTICE: DVDPlayer: Opening: rtmp://live00.seeon.tv/redirect playpath=75a9xzy4ar89ur0 swfurl=http://www.seeon.tv/jwplayer/player.swf
18:37:04 T:1788 M:1944285184 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
18:37:04 T:1496 M:1944276992   DEBUG: Thread CDVDPlayer start, auto delete: 0
18:37:04 T:1496 M:1944272896  NOTICE: Creating InputStream
18:37:04 T:1496 M:1944272896    INFO: CDVDInputStreamRTMP::CDVDInputStreamRTMP: Using external libRTMP
18:37:04 T:1496 M:1943461888    INFO: Parsing...
18:37:04 T:1496 M:1943461888    INFO: Parsed protocol: 0
18:37:04 T:1496 M:1943461888    INFO: Parsed host    : live00.seeon.tv
18:37:04 T:1496 M:1943461888    INFO: Parsed app     : redirect
18:37:04 T:1788 M:1943461888   DEBUG: ------ Window Init (DialogBusy.xml) ------
18:37:04 T:1496 M:1943191552    INFO: RTMP_Connect1, ... connected, handshaking
18:37:05 T:1496 M:1943183360    INFO: HandShake: Type Answer   : 03
18:37:05 T:1496 M:1943183360    INFO: HandShake: Server Uptime : 96850052
18:37:05 T:1496 M:1943183360    INFO: HandShake: FMS Version   : 3.0.1.1
18:37:05 T:1496 M:1943183360    INFO: HandShake: Handshaking finished....
18:37:05 T:1496 M:1943183360    INFO: RTMP_Connect1, handshaked
18:37:05 T:1496 M:1943183360    INFO: Invoking connect
18:37:05 T:1496 M:1943183360    INFO: HandleServerBW: server BW = 2500000
18:37:05 T:1496 M:1943183360    INFO: HandleClientBW: client BW = 2500000 2
18:37:05 T:1496 M:1943183360    INFO: HandleCtrl, received ctrl. type: 0, len: 6
18:37:05 T:1496 M:1943183360    INFO: HandleCtrl, Stream Begin 0
18:37:05 T:1496 M:1943183360    INFO: HandleChangeChunkSize, received: chunk size change to 512
18:37:05 T:1496 M:1943179264    INFO: RTMP_ClientPacket, received: invoke 225 bytes
18:37:05 T:1496 M:1943183360    INFO: (object begin)
18:37:05 T:1496 M:1943183360    INFO: Property: <Name:           no-name., STRING:    _error>
18:37:05 T:1496 M:1943183360    INFO: Property: <Name:           no-name., NUMBER:    1.00>
18:37:05 T:1496 M:1943183360    INFO: Property: NULL
18:37:05 T:1496 M:1943183360    INFO: Property: <Name:           no-name., OBJECT>
18:37:05 T:1496 M:1943183360    INFO: (object begin)
18:37:05 T:1496 M:1943183360    INFO: Property: <Name:              level, STRING:    error>
18:37:05 T:1496 M:1943183360    INFO: Property: <Name:               code, STRING:    NetConnection.Connect.Rejected>
18:37:05 T:1496 M:1943183360    INFO: Property: <Name:        description, STRING:    Connection failed: Application rejected connection.>
18:37:05 T:1496 M:1943179264    INFO: Property: <Name:                 ex, OBJECT>
18:37:05 T:1496 M:1943179264    INFO: (object begin)
[b]18:37:05 T:1496 M:1943179264    INFO: Property: <Name:           redirect, STRING:    rtmp://live7.seeon.tv/edge>[/b]
18:37:05 T:1496 M:1943175168    INFO: Property: <Name:               code, NUMBER:    302.00>
18:37:05 T:1496 M:1943179264    INFO: (object end)
18:37:05 T:1496 M:1943179264    INFO: Property: <Name:           clientid, NUMBER:    408648482.00>
18:37:05 T:1496 M:1943179264    INFO: (object end)
18:37:05 T:1496 M:1943179264    INFO: Previous line repeats 1 times.
18:37:05 T:1496 M:1943179264    INFO: HandleInvoke, server invoking <_error>
18:37:05 T:1496 M:1943179264   ERROR: rtmp server sent error

This is what I get from the html on the site:
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>

A working rtmpdump command - rtmpdump doesn't handle redirects automatically, so I have to use this url:
Code:
rtmpdump -r "rtmp://live7.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

I could hardcode this as the redirected url's are always something like live#.seeon.tv where the # can be from 1-7 and any of them work at all times I've tried for all of their streams

But for the interest of developing an addon that is low maintenance and dynamic, it would be preferred not to hardcode
Reply
#2
If rtmpdump doesn't handle it then that indicates librtmp doesn't handle it. It would need to be added there first and foremost.

Once librtmp supports it, then XBMC will support it.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Ok thanks for the reply!

I guess I was hoping for some sort of scripting trick to grab it

I'll try my luck at suggesting this to the librtmp development and see what happens, in the meantime I'm hardcoding Sad
Reply
#4
looks like that sets which server you use


could set a randomizer? (probably a bit better than hardcoding)


PHP Code:
import random

random_server 
str(random.randint(17))

full_url 'rtmp://live' random_server '.seeon.tv/edge' 
Reply
#5
anarchintosh Wrote:looks like that sets which server you use


could set a randomizer? (probably a bit better than hardcoding)


PHP Code:
import random

random_server 
str(random.randint(17))

full_url 'rtmp://live' random_server '.seeon.tv/edge' 

You read my mind!

Exactly what I was going to do, this takes care of this stream.. unfortunately the site I'm working on (firstrowsports.eu) steals streams from many different providers, right now I have a couple more that do redirects but where the full IP changes and is seemingly random as well

One time it could be 12.34.56.78, the next it could be 98.76.54.43.. if I could get a good list of them, I could randomly select from an array
Reply
#6
hate to revamp and old thread, but was curious to see if this has ever been resolved.
Reply
#7
interesting how does the random server work ??

as i have changed some code in one of my plugins but it still shows as what is is suppost to ?

"live306.edge.filmon.com"


is it supposed to randomnly change that ??
Reply
#8
(2012-09-17, 09:36)vegetto Wrote: hate to revamp and old thread, but was curious to see if this has ever been resolved.

if you are using librtmp from my builds then it should be handled automatically. i have recently noticed that a xbmc dev on github has pushed my combined patch file to the upstream. though it's not the latest one but redirection handling patch is included.

https://github.com/xbmc/xbmc/commit/2c84...63d9a216f5
Reply
#9
Woo finally an updated librtmp Smile
Reply
#10
Does anyone know if rtmp redirection is currently working or not? If so how do update librtmp?
@ksv..
Does your lib works with redirection?
Reply
#11
Is it possible or too late now to include the most recent patch into Frodo before release?

The one included in the github link is a bit old and would be nice to have the new XBMC version released final with the latest librtmp patches included so that we don't need to manually compile/update
Reply
#12
If anyone is having issues with redirects on iOS products (Apple TV, iPhone, iPod Touch), I released a librtmp working for redirects at:

http://forum.xbmc.org/showthread.php?tid...pid1326756
Reply
#13
If I'm not mistaken, I believe I read that XBMC is now pulling in latest librtmp from svpenn's github and he labeled it as 2.4.1
Reply
#14
(2013-02-07, 04:36)Eldorado Wrote: If I'm not mistaken, I believe I read that XBMC is now pulling in latest librtmp from svpenn's github and he labeled it as 2.4.1

That's what I have heard rumors about, but any time I ever try anything with XBMC 12.0 Frodo final on Windows, iPhone, iPod, Apple TV, etc, it never plays anything that needs RTMP directs like anything from ilive.to without updating librtmp, it never plays.
Reply

Logout Mark Read Team Forum Stats Members Help
RTMP Redirects0