(2012-12-12, 03:58)markhoney Wrote: The sniffing is fairly easy on a desktop - I've also done it using Chrome, by dumping the browser memory to a file and then opening it in a hex editor. Unfortunately, though, you can't do this from within XBMC!
The trick is to work out how to get from the HTML page and its ensuing HTTP requests to a working RTMP URL. Some sites, like BrightCove, use AMF requests and responses to pass URLs to the player. These requests can be made in XBMC using pyamf. Other sites build the URLs from javascript variables, and simple regexes can extract all that's needed to build the URL. I'm not sure how shahid does it yet, but hopefully we'll find a way to glean the required variables from the webpages available.
Yup, totally agree. A useful step anyhow is to sniff via the desktop to get a better understanding of how the service works.
To give you a bit of background, there is another Shahid plugin that was released early in the month; not as functional or polished in terms of UX, but successfully plays videos. The streams are extracted via an external python api hosted on google apps. I have contacted the author to see if he wanted to share his findings around extracting the stream; not a lot of luck there.
See the following example of how this works:
A given video lives on the following URL:
http://shahid.mbc.net/media/video/31374/
The "video key" is extracted from the following URL:
http://testpipe12.appspot.com/?url=http:...deo/31374/
<rss version="2.0" xmlns:boxee="http://boxee.tv/rss" xmlns:media="http://search.yahoo.com/mrss/"> <channel><title>Shahid</title><item><title>Get Videos (rtmpe)</title><link>rss://myveetle12.appspot.com/?url=975ab240d6ea4437aae3dc32259347b1/xxxx</link></item><item><title>Get MP4 stream 400kb</title><link>rss://mbclnk12.appspot.com/?url=http://shahid.mbc.net/media/video/31374/</link></item> </channel> </rss>
To get the list of RTMPE streams, you simply need to hit the following URL:
http://myveetle12.appspot.com/?url=975ab...347b1/xxxx
<rss version="2.0" xmlns:boxee="http://boxee.tv/rss" xmlns:media="http://search.yahoo.com/mrss/"> <channel><title>SHAHID</title><item><title>play 1200.0 kb </title><link>rtmpe://mbc3.csl.delvenetworks.com/a6344/v1/ swfUrl=http://s.delvenetworks.com/deployments/player/player-3.37.5.12.swf pageUrl=http://live.1hd.ro/ playpath=mp4:media/2fda1d3fd7ab453cad983544e8ed70e4/975ab240d6ea4437aae3dc32259347b1-c59d428aaaaf43e982d87b261409ffbc/the_voice_s01_e01_vod.mp4</link></item><item><title>play 800.0 kb </title><link>rtmpe://mbc3.csl.delvenetworks.com/a6344/v1/ swfUrl=http://s.delvenetworks.com/deployments/player/player-3.37.5.12.swf pageUrl=http://live.1hd.ro/ playpath=mp4:media/2fda1d3fd7ab453cad983544e8ed70e4/975ab240d6ea4437aae3dc32259347b1-8ef461a183eb48b6ba6165916760c0c3/the_voice_s01_e01_vod.mp4</link></item><item><title>play 400.0 kb </title><link>rtmpe://mbc3.csl.delvenetworks.com/a6344/v1/ swfUrl=http://s.delvenetworks.com/deployments/player/player-3.37.5.12.swf pageUrl=http://live.1hd.ro/ playpath=mp4:media/2fda1d3fd7ab453cad983544e8ed70e4/975ab240d6ea4437aae3dc32259347b1-d7a9d97f5ea443d98684fde5a449ee1c/the_voice_s01_e01_vod.mp4</link></item> </channel> </rss>
Alternatively, you can ge the mobile MP4 stream:
http://mbclnk12.appspot.com/?url=http://...deo/31374/
<rss version="2.0" xmlns:boxee="http://boxee.tv/rss" xmlns:media="http://search.yahoo.com/mrss/"> <channel><title>python feeds</title><item><title>play</title><link>http://mbc3.cpl.delvenetworks.com/media/2fda1d3fd7ab453cad983544e8ed70e4/975ab240d6ea4437aae3dc32259347b1-d4919cc37eb542bdb1ac25f06ad516a2/the_voice_s01_e01_vod.mp4?h=1ba7ba79320c0f0dede4d127caef62de"</link></item> </channel> </rss>
The above stream are working and solve the problem.