PDA

View Full Version : Need help with rtmp source (YLE Areena)


JaniL
2009-06-11, 17:23
Hi, Finland's national broadcasting company YLE released new version of their "iPlayer" called YLE Areena.

Big problem is that they have started to use RTMP, and i don't really get it.

import xbmc, xbmcgui

playpath = "mp4:kotimaa/25/48/254800_204511.mp4"
rtmp_url = "rtmp://flashk.yle.fi/AreenaServer/"
swf_url = "http://areena.yle.fi/player/Application.swf?build=1"
pageUrl = "http://areena.yle.fi/video/254798"
item = xbmcgui.ListItem("AreenaServer")
item.setProperty("SWFPlayer", swf_url)
item.setProperty("PlayPath", playpath)
#item.setProperty("PageURL", pageUrl)
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(rtmp_ url, item)
Here's code, i have tried (http://xbmc.org/forum/showpost.php?p=346426&postcount=6) these (http://xbmc.org/forum/showpost.php?p=339014&postcount=38) solutions (http://xbmc.org/forum/showpost.php?p=337330&postcount=1) but all i get is:
17:17:44 T:3808 M:774168576 DEBUG: START AMF Object Dump:
17:17:44 T:3808 M:774168576 DEBUG: Property: <Name: level, STRING: error>
17:17:44 T:3808 M:774168576 DEBUG: Property: <Name: code, STRING: NetStream.Play.Failed>
17:17:44 T:3808 M:774168576 DEBUG: Property: <Name: description, STRING: Read access denied for stream kotimaa/25/48/254800_204511.mp4.>
17:17:44 T:3808 M:774168576 DEBUG: Property: <Name: clientid, STRING: nEpQtDRb>
17:17:44 T:3808 M:774168576 DEBUG: END AMF Object Dump:
17:17:44 T:3808 M:774168576 DEBUG: END AMF Object Dump:
17:17:44 T:3808 M:774168576 DEBUG: RTMP_LIB::CRTMP::HandleInvoke, server invoking <onStatus>
17:17:44 T:3808 M:774168576 DEBUG: RTMP_LIB::CRTMP::HandleInvoke, onStatus: NetStream.Play.Failed

frosty
2009-06-11, 21:59
The site won't stream to me in England, so either it's currently broken or geographically limited. That means I can't watch the real player connecting and playing in Wireshark (which is the simplest way to see what's going on).

Some random guesses:
- try giving a playpath that you know won't exist. See if a different error is generated than "Read access denied for stream". If it's doesn't, maybe the playpath is wrong. If it does, the playpath is right, and the server doesn't want to talk to you - something we send must be different to what the flash player would send.
- if it seems like the playpath is wrong, try dropping the ".mp4"

JaniL
2009-06-12, 00:52
The site won't stream to me in England, so either it's currently broken or geographically limited. That means I can't watch the real player connecting and playing in Wireshark (which is the simplest way to see what's going on).

Some random guesses:
- try giving a playpath that you know won't exist. See if a different error is generated than "Read access denied for stream". If it's doesn't, maybe the playpath is wrong. If it does, the playpath is right, and the server doesn't want to talk to you - something we send must be different to what the flash player would send.
- if it seems like the playpath is wrong, try dropping the ".mp4"Trying random playpath and dropping .mp4 gave me same error.

There are video/audio that are available for everybody, if you want to try:

http://areena.yle.fi/ohjelmat/naytetaan_ulkomailla/kylla

frosty
2009-06-13, 13:46
My mistake, the website plays fine after taking ages to load the video player into the page.

I don't think these streams will be playable by XBMC, as the flash player is more complex than most, and appears to implement some sort of licencing/authorization policy.

In a debug log you can see the server sending us an 'invoke' request for a method 'authenticationDetails' (that their flash player implements, rather than the RTMP protocol itself):

RTMP_LIB::CRTMP::GetNextMediaPacket, received: invoke 108 bytes
START AMF Object Dump:
Property: <no-name. STRING: authenticationDetails>
Property: <no-name. NUMBER: 0.00>
Property: NULL
Property: OBJECT ====>
START AMF Object Dump:
Property: <Name: locatedInBroadcastTerritory, BOOLEAN: TRUE>
Property: <Name: randomAuth, NUMBER: 270223.00>
Property: <Name: tvFeeActivated, BOOLEAN: FALSE>
END AMF Object Dump:
END AMF Object Dump:
RTMP_LIB::CRTMP::HandleInvoke, server invoking <authenticationDetails>


in a wireshark dump of the real player, you can see a response to this including some number, and then other calls back and forward including strings like "requestData" "session/authenticate/1"

This can't be implemented in XBMC (we're not a full flash player), so if these calls are necessary to convince the server we're allowed to stream the video, then XBMC cannot be able to play it. :sad:

JaniL
2009-06-14, 01:34
Ah, ok :(

Thanks anyway.