[WINDOWS]Problem I can't explain with plugin on latest nightly build
#1
Question 
I've written a plugin which connects over the internet to a site, retrieves an mms stream URL and plays live streaming using that url. It runs fine on my 10.1 installation on win 7. On the same Win7 I've installed the newest nightly build of xbmc. When I run the same plugin on that version I get a stream with blocked message from the site supplying the stream.

The way that site protects itself is via a cookie which I get from the page. To get that cookie I basically go to a page, retrieve a video Id, call on another page (which in a browser is shown as the player Iframe) using the found id, and from that page I get a url for a playlist and get the cookie to add to the playlist call in order to retrieve the right mms stream list (and not the list with the blocked message)

I would appreciate if anyone has an idea of what could cause a difference between the two versions. I'm thinking cookie management, but I don't know, and I don't know how to check.
Reply
#2
sbentin Wrote:I've written a plugin which connects over the internet to a site, retrieves an mms stream URL and plays live streaming using that url. It runs fine on my 10.1 installation on win 7. On the same Win7 I've installed the newest nightly build of xbmc. When I run the same plugin on that version I get a stream with blocked message from the site supplying the stream.

The way that site protects itself is via a cookie which I get from the page. To get that cookie I basically go to a page, retrieve a video Id, call on another page (which in a browser is shown as the player Iframe) using the found id, and from that page I get a url for a playlist and get the cookie to add to the playlist call in order to retrieve the right mms stream list (and not the list with the blocked message)

I would appreciate if anyone has an idea of what could cause a difference between the two versions. I'm thinking cookie management, but I don't know, and I don't know how to check.


debug log might have some useful info
Reply
#3
We switched from a custom wrapped python 2.4 to an almost vanilla python 2.6.6.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
Do I need to do something else for cookie handeling?
Reply
#5
I'm no python expert so can't tell. But as amet said a debug log might tell us more.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
got back to this issue now.

here is the log from the 10.1 version that works

http://pastebin.com/hsT3v95a

here is the link for the log of the nightly build that does not work

http://pastebin.com/9iHTWgUy

I can't see anything in the log that may explain this. I get a stream on both, only with the first I get the real stream and with the second I get a messsage saying I can only watch this video from a browser.

maybe someone else can make sense of thisHuh
Reply
#7
Lightbulb 
Did some more checking. The problem is not with python, it is with the xbmc player. The url which is retrieved by the script from the site, including the cookie is fine. I checked it with a regular browser and received the video... (in the script I assign this URL to a list item and then use xbmc player to play it.)

I looked at the request using Wireshark and saw what I think is the problem. The request version sent by the player in dharma is:

(Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 HTTP/1.0

The request version sent in the newer nightly build version is just the following:

HTTP/1.1

Here is why I think this is related: The site hosting the video is "castup". Using dharma 10.1 it plays a video, using the nightly build version it returns a message saying the video can only be played by the web site. After I saw that the url sent by both xbmc versions is a good URL I wondered how castup knows that I'm not a browser.... looking at the information sent on the request I think this is the problem, it sees the player's request as not being a browser.
Reply
#8
Continuing from where I left off on my previous checks, and with the knowledge that the cookies are fine and the url's are fine I continued investigating this problem: I decided to check the problem and compare the actual urls sent by xbmc using a sniffer and I found something.

The following URL is what I got from the XBMC log (nightly build from july 24:

Code:
http://s0Awm.castup.net/server12/206/542/54289786-61.wmv?ct=IL&rg=BZ&aid=206&ts=0&cu=45FCA038-861F-407B-B737-EB998190F052&cuauth=|1|0|013B013B023B803B803B70387C92BF5BCCD012CBC9C010E88586CD0CB5CCC2A4D2451779EF9078E6C1A2D75A8A955251BCE0A29B42EC69C5A6E74160F9C8CE2F236B9C46FA3715B00E0222830340C70A1AD8272949AE5D88F5DA5893C24ACC6D94E6A617C7A958F821929508F65271367EB477853D5E1C957086885F50B2491617B647009F2A6A87F9D52DA9F7CB6428E77AD09171FF45E0A81798E3DF2ED2FA6FA0491F552F5E9DBB73C9DE9CF7646E2E4B9B8E3340F662315BB54F80D5601B9096C6C242861A28CB1BA9FE5E9118D1C3435B5571A9B134BF84285680&cufn=54289786-61.wmv

And here is what was actually sent by xbmc which I caught in the sniffer:

Code:
http://s0Awm.castup.net/server12/206/542/54289786-61.wmv?ct=IL&rg=BZ&aid=206&ts=0&cu=45FCA038-861F-407B-B737-EB998190F052&cuauth=|1|0|013B013B023B803B803B70387C92BF5BCCD012CBC9C010E88586CD0CB5CCC2A4D2451779EF9078E6C1A2D75A8A955251BCE0A29B42EC69C5A6E741

I have made the same test with dharma and in dharma both urls are the same...

It seems that for some reason the URL is cut. This happens on all URLS that are very long like here, URL's I get using the same plugin, and same code mechanism which are shorter work on both dharma and the nightly build.

I'll appreciate if some one who knows more about the internals of video playing using the xbmc player will look this issue over.... or point me to where I can possibly look for the problem
Reply
#9
hi
any luck on this?
i am looking for a plugin that will allow me to watch streaming tv from castup which change the asx file all the time.
thanks
Reply

Logout Mark Read Team Forum Stats Members Help
[WINDOWS]Problem I can't explain with plugin on latest nightly build0