PDA

View Full Version : [RESEARCH] RTMP plugin for "RTL Now" - Need a little help...


chmee
2009-06-19, 11:35
Hey Mates, i registered here just for this problem, to solve or to realize, its not possible :) Ah -> and to thank you all for this beautiful piece of code. So, i m not a hardcorecoder, please dont mess up with this messy code i wrote :grin: This plugin shell be my thankYou-gift, giving some back to the community, and i know a lot of people want to see rtlnow in xbmc (fe my wife -> the known WAF, she accepts the pc in livingroom if i give her the rtlnowstream)

Things Done :
A little plugin, that parses the rtlnow (http://rtl-now.rtl.de/) site for free content. I think i collected all needed info to start the stream, but i do not understand the properties of the play-command (setProperty).

Error : Signiture does not match

Questions :
1. It seems, i use the wrong informations to start the stream
2. or the site need some control-string to start - cookie, phpsession, GET-Return-Variables.
3. Is the xbmc-rtmp-code able to manage all needs to start a stream. When does it not ?
4. I found in net, that other codes (flazr (http://ptrthomas.wordpress.com/2009/04/05/announcing-flazr-download-rtmp-flash-video-streams/) or rtmpdump (http://board.gulli.com/thread/885327-videos-von-rtl-now-speichern/16/)) can handle it and start a stream, why not here ?

So, in the german xbmc-forum i put some interesting things, fe a wireshark-log and the v0.9-plugin, functional till streamstart.

->LOOK HERE for Plugin and Wireshark-logs <- (http://www.xbmc.de/xbmc/e107_plugins/forum/forum_viewtopic.php?25122)

Ah i see, that you dont see the graphics as a guest, so i link it here:
http://www.phreekz.de/DLS/XBMC/RTLnow_Request_08.gif
http://www.phreekz.de/DLS/XBMC/RTLnow_Request_Browserside.gif
http://www.phreekz.de/DLS/XBMC/RTLnow_Request_XBMC.gif

--> The Plugin v0.9 <-- (http://www.phreekz.de/DLS/XBMC/RTLNow_v0.9.zip)

Thanks for all info and help, and sorry for strange english :rofl:
regards chmee

frosty
2009-06-20, 15:51
It appears their RTMP server rejects connections unless the swfUrl and pageUrl parameters of the RTMP 'connect' packet are set to values including their domain ... it's a kind of access-protection. However these values are under XBMC's control - set them like this:


import xbmc, xbmcgui

playpath = "37/RTL_kinderaerztestmarien_090602_700k"
rtmp_url = "rtmp://fms.rtl.de/rtlnow/_definst_"
swf_url = "http://rtl-now.rtl.de/includes/rtlnow_videoplayer09_2.swf"
page_url = "http://rtl-now.rtl.de/awz.php"
item = xbmcgui.ListItem("RTL")
item.setProperty("PlayPath", playpath)
item.setProperty("SWFPlayer", swf_url)
item.setProperty("PageURL", page_url)
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(rtmp_ url, item)


The mapping of RTMP protocol parameters to XBMC is:

RTMP connect packet:
app ........non-domain part of the URL (called rtmp_url above)
swfUrl......item property "SWFPlayer"
tcUrl.......URL (called rtmp_url above)
pageUrl.....item property "PageURL"

RTMP play packet:
play........item property "PlayPath"



If you don't need to set swfUrl/pageUrl then item properties aren't needed and the server, app, and playpath can be conveniently combined into a single URL (eg. to put in a .strm file):
rtmp://<server>[:port]/<app>/<playpath>
eg
rtmp://flashCC-06.crossmediaventures.com/nickelodeon/1038_640.flv
rtmp://velblod.videolectures.net/video/2007/other/cd07_ljubljana/eco_umberto/cd07_eco_thu_01
(as long as 'playpath' value does not contain slash)
or
rtmp://<server>[:port]/<app>?slist=<playpath/with/slashes>
eg
rtmp://flashCC-06.crossmediaventures.com/nickelodeon?slist=1038_640.flv
rtmp://velblod.videolectures.net/video/2007/other/cd07_ljubljana/eco_umberto?slist=cd07_eco_thu_01

chmee
2009-06-20, 19:49
Frosty, thanx a lot. It's starting now. It stops after about 1minute, seems to want a new request or i dont know :)

18:43:37 T:2516 M:1229295616 ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true

Wireshark Log :
http://www.phreekz.de/DLS/XBMC/RTLnow_RST_095.gif
You see the rtsserv[RST] on about 54seconds.. Then the odn-castraq[RST] on 66sec. These IPs are google.. Then the snifferserver on 68sec, ip is RTL.

SWF Stream protection ? Player verification ?


So, for the friends of developing and pre v1 version, here it is. I'll do my best to handle the breakup after the short time. Then it will be time for v1.0 :)

-> RTLnow Plugin v0.95 <- (http:/www.phreekz.de/DLS/XBMC/RTLnow_v0.95.zip)

regards chmee

frosty
2009-06-20, 21:15
I believe this is due to the flash feature "SWF Verification", which is not supported. In a debug log you will see :
RTMP_LIB::CRTMP::HandlePing, received: ping, type: 26
then shortly after (when we don't reply) the server will close the stream.
See also http://xbmc.org/trac/ticket/6403 which appears to be the same issue, and has a few details.

chmee
2009-06-20, 21:59
ah, mh, ok.

Now i red, this verification is based on a 1on1 compare of the clientplayer to a saved copy on the server. The verification happends thru a checksum, isnt it ?

Means, for every player(site) there is a static hash, what verifying the right/wrong player ? Do it make sense, to put this verification response (hash-variable) as a property ?

links:
http://lkcl.net/rtmp/RTMPE.txt
http://stream-recorder.com/forum/swf-verification-rtmpe-stream-get-swfhash-t4174.html?t=4174

If this infos may be illegal, wipe it out..

regards chmee

rapalot
2009-08-02, 23:59
Hi chmee!

How is the progress?
I'm looking forward to use your plugin.
Unfortunately I can't help you with python.
I can only tell you that I have no problems downloading videos as a whole from RTL Now with rtmpdump on Windows.
Maybe some parts from the rtmpdump source can be used for the python plugin.

chmee
2009-08-03, 01:04
Ah, nothing new, because the rtmp-core -as it seems- wont be changed. So, its like it is. The basecode for scraping/listing is running (last time i used the plugin, they changed a small thing in the html-code, so i had to change a thing in the regex).

changelog 0.96:
regex for the free videos - line 71 (neutralnavi)
regex for the xml-url - line 109 (data:")

Video stopping by about 1min because of lack of verification response.

-> Download Here v0.96 <- (http://www.phreekz.de/DLS/RTLNow_v0.96.zip) - 14kb

regards chmee

motd2k
2009-08-03, 04:17
I'll pop this on my list.

frosty
2009-08-04, 01:18
Be aware that (http://www.adobe.com/devnet/rtmp/):
By downloading the RTMP specification, you are agreeing to the RTMP license. To benefit customers who want to protect their content, the open RTMP specification does not include Adobe's unique secure RTMP measures, nor does the license that accompanies the specification allow developers to circumvent such measures

Adobe have previously unleashed lawyers (however that was on a stream-downloader) http://www.applian.com/replay-media-catcher/support/secure-rtmp-measures.php

So it may be sensible to proceed cautiously with any specific features in this area. I don't think anyone would want unnecessary issues.

motd2k: many thanks for your recent RTMP features!

chmee
2009-08-04, 02:03
Just've been my thoughts too..

regards&thx chmee

chmee
2009-09-25, 00:19
A new Idea to realize this Quest :D

Maybe its possible to start a browser from xbmc with fullscreen flashplayer :D If needed, the script would build a site and embed the flash player via the right data to play it fullscreen, and possibly to close the browser after the movielength (if its embeded or readable in the xml)..

Any Hints?- regards chmee

Put RTLNow now as v0.961 to DL (http://www.phreekz.de/DLS/XBMC/RTLNow_v0.961.zip)-they changed a bit in xml-data.
Now i parse /2/E79621_FA001_700k instead of /rtlnow/2/E79621_FA001_700k again. 've Been a signiture does not match error