[RELEASE] Hulu (Video) Plugin for XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154) +---- Thread: [RELEASE] Hulu (Video) Plugin for XBMC (/showthread.php?tid=42041) |
- ptaylor - 2009-02-19 mr.b Wrote:since this is not running from within an SWF file (in a browser), it might be easier to have the code pic up a list of encrypted PIDs in a file (xml maybe) and do it in a batch type process. Or, simply have it read a file in with a single PID? That would translate well to the xbmc plug-in logic (write encrypted pid to file, run decryption tool, read decrypted pid, continue as usual.) - angrycamel - 2009-02-19 rectalogic Wrote:Yes, but to access the command line we need an AS3 host swf which get the args from parameters then load the AS2 swf I wrote and pass it the args as query-string. Not too complicated, I'll look at it tonight. Great stuff. I like the idea of running the swf directly in XBMC but is that limited to Windows only or would the Boxee flashlib run on the Xbox? - rectalogic - 2009-02-19 angrycamel Wrote:Great stuff. I like the idea of running the swf directly in XBMC but is that limited to Windows only or would the Boxee flashlib run on the Xbox? I think the flashlib stuff is Windows, Mac and Linux. Not sure about Xbox. In any case, I'm sure AIR won't work on Xbox. So maybe something like Gnash would be a better approach. Basically we just need some way to invoke a flash AS2 interpreter via the command line and get stdout from it. - angrycamel - 2009-02-19 Ya I see what you're getting at. If I have some time, I will try and play around with gnash on the xbox to see if it will run the code. Hulu Stopped Working Suddenly - ribs15183 - 2009-02-19 So I had the Hulu plugin working just fine for a few days with the latest version of XBMC from T3CH. The past couple days when I fire up the Hulu plugin, I get the directory listings just fine but when I try to play a movie the current directory I'm in is reloaded and no movie is played. Any ideas? Thanks! EDIT: Sorry for the quick post without scrolling back a few pages. - angrycamel - 2009-02-19 angrycamel Wrote:Ya I see what you're getting at. If I have some time, I will try and play around with gnash on the xbox to see if it will run the code. Bummer... ysbox Wrote:I took a look at gnash a while ago, and imho it has too heavy dependencies like glib, boost, libmad, not mentioning cairo/gtk... (and so on, http://www.gnu.org/software/gnash/ma...tml#codedepend), the least thing XBMC needs is more library ports to xbox for a "niche" functionality. http://forum.xbmc.org/showpost.php?p=149039&postcount=50 - rectalogic - 2009-02-19 angrycamel Wrote:http://forum.xbmc.org/showpost.php?p=149039&postcount=50 We don't need all that stuff from gnash, we don't need any of the visual pieces or video support etc. - just the AS2 interpreter. So possibly that can be compiled separately with minimal dependencies, haven't looked yet. - TheEvilHammer - 2009-02-19 ribs15183 Wrote:So I had the Hulu plugin working just fine for a few days with the latest version of XBMC from T3CH. Go back to post #531 and start reading from there. - TheEvilHammer - 2009-02-19 ptaylor Wrote:You should be able to pick them out of a tcpdump when viewing a video via a browser. I did so last night with wireshark. I was thinking that perhaps something could be automated to learn the pids and store them in a central database. Here's a Wireshark display filter that will help you get the pid: Code: http.request.method == "GET" and http.request.uri contains "pid=" As whirlwind mentioned, you can also use the Live HTTP Headers plugin for Firefox and search through all the headers for "pid=". As an aside, if you're looking to download Hulu videos (as opposed to streaming them from XBMC, which is what this thread is about), you can get rtmpdump and edit the get_hulu Perl script to either hardcode the pid or take the pid as a parameter for the particular video you want. - afail - 2009-02-20 just wanted to thank you all for your efforts to keep the hulu plugin alive - w3__ - 2009-02-20 That goes for me too! Something to get us back online for now - angrycamel - 2009-02-20 Here is something to hold us over... Using rectalogic's ActionScript as a starting point and compiling with mtasc, I created an SWF that will decrypt the passed in encrypted pid and redirect to a PHP that puts it into an easily consumable xml format. Here is how it works: Here is the test data I used while putting it together: Code: Heroes PID Conversion Test The modified version of rectalogic's code. I had it outputting to a text field in the swf for testing, but as you can see, that gets commented out so that you don't even see the swf... just an auto redirect to the output xml. Code: import mx.controls.*; The PHP that outputs the XML is about as simple as it get's, but here it is anyways. PHP Code: <?php Try it yourself... (replace the pid in the url with whatever pid you want to test out) http://angrycamel.com/DecryptPid.swf?pid=183442a1469fe64906e11e4ccde6f550ae33747d7f27dddc3fef0d4369c19665~fc3f25e17f446c6d6d5f4d35b407b1f90e157cbc68a409838b1968d345cd040b Let me know if you run into any problems, and test as many PID's as you can. I had trouble getting the SWF to reference the sec.swf directly from hulu.com, so I have it looking at a copy on my site right now. If anyone can offer any suggestions, please do. - ptaylor - 2009-02-20 rectalogic Wrote:Yeah, I think they put the encryption logic in sec.swf so they can change it often independent of the player.swf code itself. I'm been messing with this for a bit and find that adl doesn't seem to exit when it is complete... Not sure how to make it exit. Here's what I've done to your code so far: PHP Code: class DecryptPid { That reads the file encryptedPid.txt and decrypts it. Note: The contents of encryptedPid.txt should be pid={encrypted pid here} I read here that you can pass command line parameters via adl by using -- followed by whatever parameter you want to pass. I just ran across this, so I haven't tried yet... The bigger problem I'm having is just exiting adl when it is done. - angrycamel - 2009-02-20 check my post from a few min ago to see how to take in a parameter Edit: oops I just realized you were talking about win cmd line parms not URL parms, sorry. - rectalogic - 2009-02-20 ptaylor Wrote:I'm been messing with this for a bit and find that adl doesn't seem to exit when it is complete... Not sure how to make it exit. You can exit using NativeApplication.nativeApplication.exit(0) - but that can only be done in AS3. So you need an AS3 swf that hosts the AS2 swf that loads sec.swf and calls dec(). Anyway, I think gnash is a better approach. I just tested with gnash and it works, and it exits and it can take command line args to specify the input pid. e.g. Code: $ gnash --render-mode 0 --once --verbose --param FlashVars=pid=a9d2af515205989ce1d8bd20fa36db2c29a307b089a3351401012878b8b399d9~39474f6e3096ab2e5252d39741bd99994a4f0750bac32ef01c2c79a4845a5d37 DecryptPid.swf Modified code to take command line "pid" arg from gnash: Code: class DecryptPid { |