help needed: how to programmatically get video url from brightcove
#1
I am trying to write a plugin for http://www.sonyliv.com/.

Take this page for example: http://www.sonyliv.com/watch/thriller-ep...tober-2014

The video URL is: http://setindiapd.brightcove.com.edgesui...ffiliateId=

Firefox addon DownloadHelper gets the video url nicely.

Now, how do I get the above mentioned video URL from the page for xbmc?

The related info I have from the page is:

<meta property="og:video" content="http://c.brightcove.com/services/viewer/federated_f9/3780015692001?isVid=1&amp;isUI=1&amp;playerKey=AQ~~,AAAApSSxphE~,wbrmvPDFim0fWkqLtb6niKsPCskpElR9=3832755198001">

<meta property="og:videoConfusedecure_url" content="https://secure.brightcove.com/services/viewer/federated_f9/3780015692001?isVid=1&amp;isUI=1&amp;playerKey=AQ~~,AAAApSSxphE~,wbrmvPDFim0fWkqLtb6niKsPCskpElR9&amp;videoID=3832755198001&amp;secureConnections=true">

<object id="myExperience3832755198001" class="BrightcoveExperience">
<param name="bgcolor" value="#000000"/>
<param name="width" value="491"/>
<param name="height" value="314"/>
<param name="playerID" value="1525460839001"/>
<param name="playerKey" value="AQ~~,AAAApSSxphE~,wbrmvPDFim16NeJrKcW08mQC17noWah8"/>
<param name="additionalAdTargetingParams"
value="vpCategory=89969f4b-0941-4531-88e1-669e135d925c&vpTags=CID"/>
<param name="@videoPlayer" value="3832755198001"/>
<param name="isVid" value="true"/>
<param name="isUI" value="true"/>
<param name="wmode" value="transparent"/>
<param name="dynamicStreaming" value="true"/>
<param name="includeAPI" value="true"/>
<param name="templateLoadHandler" value="onTemplateLoad"/>
<param name="templateReadyHandler" value="onTemplateReady"/>
<param name="templateErrorHandler" value="onPlayerError"/>
</object>

Any help is appreciated.

Thanks.
Reply
#2
Brightcove can be a pain. It's not as straightforward as one would like. Have a look at my addon : https://github.com/learningit/plugin.video.si for Sports Illustrated which uses Brightcove. I wrote this quite some time back and patterned after another addon (which one I've forgotten). You need to look at the play_video() routine. Basically the video_url passed has the video_content_id passed in a url after a '#' char - you can get rid of the split.

You will need to modify video_player_key, page_url, video_player_id and publisher_id for your needs. There is also a CONST at the beginning of the code which needs to be set for your purposes. If you trace through the browser requests and look at the addon code things will fall into place.

The naming conventions are a bit strange. I'm a bit confused as you list several values in the meta-data which differ from the parms given in the url, as well as a couple of different playerKeys and I'm not sure which is which.

Anyway the routines to do the AMF decode are all there.

I have a feeling that the USTV Vod addon probably has Brightcove support as well, you might have a look.
Reply
#3
thank you for the reply.

yes, i did look at ustv vod addon earlier. yes, it was complex as well. at the moment it appears all required info is there on the page, except the CONST?

hmmm, i wish this was simple - firefox download helper gets it beautifully. oh well.

i will try to get this going. thanks.

btw, it would be nice, given the videoid (and may be along with other required info) - a routine to play the video (just like we play youtube video with just the videoid in xbmc). one can always wish :-)
Reply

Logout Mark Read Team Forum Stats Members Help
help needed: how to programmatically get video url from brightcove0