[RESEARCH] RTMP plugin for "RTL Now" - Need a little help...
#1
Solved 28.02.2011 - Look Here!

Hey Mates, i registered here just for this problem, to solve or to realize, its not possible Smile 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 Big 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 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 or rtmpdump) 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 <-

Ah i see, that you dont see the graphics as a guest, so i link it here:
Image
Image
Image

--> The Plugin v0.9 <--

Thanks for all info and help, and sorry for strange english Rofl
regards chmee
Reply
#2
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:

Code:
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:
Code:
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):
Code:
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
Code:
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
If you have a problem, first search to see if it's already been addressed.
Then, read this. Include exactly which version of XBMC and plugin/script you're using. 'latest' means nothing and may lead to rage and/or a lack of helpful replies.
Reply
#3
Frosty, thanx a lot. It's starting now. It stops after about 1minute, seems to want a new request or i dont know Smile

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

Wireshark Log :
Image
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 Smile

-> RTLnow Plugin v0.95 <-

regards chmee
Reply
#4
I believe this is due to the flash feature "SWF Verification", which is not supported. In a debug log you will see :
Quote: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://trac.xbmc.org/ticket/6403 which appears to be the same issue, and has a few details.
If you have a problem, first search to see if it's already been addressed.
Then, read this. Include exactly which version of XBMC and plugin/script you're using. 'latest' means nothing and may lead to rage and/or a lack of helpful replies.
Reply
#5
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-ver...tml?t=4174

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

regards chmee
Reply
#6
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.
Reply
#7
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 <- - 14kb

regards chmee
Reply
#8
I'll pop this on my list.
Reply
#9
Be aware that (http://www.adobe.com/devnet/rtmp/):
Quote: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-catc...asures.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!
If you have a problem, first search to see if it's already been addressed.
Then, read this. Include exactly which version of XBMC and plugin/script you're using. 'latest' means nothing and may lead to rage and/or a lack of helpful replies.
Reply
#10
Just've been my thoughts too..

regards&thx chmee
Reply
#11
A new Idea to realize this Quest Big Grin

Maybe its possible to start a browser from xbmc with fullscreen flashplayer Big Grin 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-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
Reply
#12
I built a somewhat working RTL Now plugin using rtmpdump.

You need a linux machine with rtmpdump in "/usr/bin". I use Ubuntu 9.10.

1. Unzip the archive. Edit lines 77, 80 and 83 in default.py to point to the smb share or buffer share holding the output file. Set USE_PYRO according to your needs. Put "RTLNow" into your video plugin folder.

[Optional to make it run on Xbox]
2. Install the packaged Pyro: sudo aptitude install pyro

[Optional to make it run on Xbox]
3. Run the Pyro nameserver: pyro-ns -n [your_ip] -p 9090

[Optional to make it run on Xbox]
4. Go to "rtmpdump_pyro". Edit line 8 to point the output path to a folder shared through smb. Edit line 10 with your Linux machine's IP address so the pyro client will not bind to localhost. Then run it: python rtmpdump_pyro.py

5. Run XBMC and select a stream through the plugin. It takes some time to launch a stream as I let rtmpdump build up a buffer before opening the file.

http://www.megaupload.com/?d=ZW7X2BS6
Reply
#13
Now that rtmpdump's librtmp works on Xbox http://trac.xbmc.org/ticket/9146 you may not need to rely on an external Linux box to put this all together.
Reply
#14
That's really good news! Thank you!
I hope someone will implement it for RTL Now.
Reply
#15
mighty_bombero Wrote:I built a somewhat working RTL Now plugin using rtmpdump.

You need a linux machine with rtmpdump in "/usr/bin". I use Ubuntu 9.10.

1. Unzip the archive. Edit lines 77, 80 and 83 in default.py to point to the smb share or buffer share holding the output file. Set USE_PYRO according to your needs. Put "RTLNow" into your video plugin folder.

[Optional to make it run on Xbox]
2. Install the packaged Pyro: sudo aptitude install pyro

[Optional to make it run on Xbox]
3. Run the Pyro nameserver: pyro-ns -n [your_ip] -p 9090

[Optional to make it run on Xbox]
4. Go to "rtmpdump_pyro". Edit line 8 to point the output path to a folder shared through smb. Edit line 10 with your Linux machine's IP address so the pyro client will not bind to localhost. Then run it: python rtmpdump_pyro.py

5. Run XBMC and select a stream through the plugin. It takes some time to launch a stream as I let rtmpdump build up a buffer before opening the file.

http://www.megaupload.com/?d=ZW7X2BS6

I tried to set up the RTL-Now Script, but I end up getting Script Errors... any Ideas? My knowledge of Python is... well... non existant Big Grin

from my xbmc.log
Quote:17:31:00 T:2798558064 M:985366528 INFO: -->Python script returned the following error<--
17:31:00 T:2798558064 M:985366528 ERROR: Error Type: exceptions.AttributeError
17:31:00 T:2798558064 M:985366528 ERROR: Error Contents: 'module' object has no attribute 'argv'
17:31:00 T:2798558064 M:985366528 ERROR: Traceback (most recent call last):
File "/home/xbmc/.xbmc/scripts/RTLNow/default.py", line 122, in ?
params=get_params()
File "/home/xbmc/.xbmc/scripts/RTLNow/default.py", line 88, in get_params
paramstring=sys.argv[2]
AttributeError: 'module' object has no attribute 'argv'
17:31:00 T:2798558064 M:985366528 INFO: -->End of Python script error report<--

PS: System runs on Ubuntu 9.10 and rtmpdump is in /usr/bin
Reply

Logout Mark Read Team Forum Stats Members Help
[RESEARCH] RTMP plugin for "RTL Now" - Need a little help...0