2012-07-31, 04:58
I modified Unbehagen's XBMC Local Proxy from http://forum.xbmc.org/showthread.php?tid=95369 to support Akamai SecureHD streaming.
Thanks to KSV for the help with tokens.
This streaming method is over http but they embedded information in the FLV file. This information is needed to make command requests to the server. The swf player url is needed to calculate an MD5 of the uncompressed player. This value is used in calculating tokens.
Base64 encode the video url and swf url. You can use those to build the proxy url. an example is below.
example code to generate the proxy url.
here is the proxy code.
http://pastebin.com/KGdHv5a0
This requires flvlib to be able to parse the flv meta-data. I am using version 0.1.12
http://pypi.python.org/pypi/flvlib/0.1.5
I am trying to work on a generic xbmc script module for this. I am not sure the proper way to run and shutdown the proxy within XBMC. I have been running it separately and just having plugins connect to it for testing.
I know National Geographic and Discovery sites in the US use this streaming method. There were also some EU Olympic streams using this type of streaming.
I need to put more work into it to make it a script module. Some might find it useful now.
Thanks to KSV for the help with tokens.
This streaming method is over http but they embedded information in the FLV file. This information is needed to make command requests to the server. The swf player url is needed to calculate an MD5 of the uncompressed player. This value is used in calculating tokens.
Base64 encode the video url and swf url. You can use those to build the proxy url. an example is below.
example code to generate the proxy url.
Code:
import base64
VIDb64 = base64.encodestring(VIDEO_URL).replace('\n','')
SWFb64 = base64.encodestring(SWF_URL).replace('\n','')
proxyUrl = 'http://127.0.0.1:64653/secureconne/%s/%s' % (VIDb64,SWFb64)
here is the proxy code.
http://pastebin.com/KGdHv5a0
This requires flvlib to be able to parse the flv meta-data. I am using version 0.1.12
http://pypi.python.org/pypi/flvlib/0.1.5
I am trying to work on a generic xbmc script module for this. I am not sure the proper way to run and shutdown the proxy within XBMC. I have been running it separately and just having plugins connect to it for testing.
I know National Geographic and Discovery sites in the US use this streaming method. There were also some EU Olympic streams using this type of streaming.
I need to put more work into it to make it a script module. Some might find it useful now.