2011-04-12, 16:25
I'm having all sorts of fun learning writing addons and the whole world of streaming.. so yet another question ![Smile Smile](https://forum.kodi.tv/images/smilies/smile.png)
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:
This is what I get from the html on the site:
A working rtmpdump command - rtmpdump doesn't handle redirects automatically, so I have to use this url:
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
![Smile Smile](https://forum.kodi.tv/images/smilies/smile.png)
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