[RELEASE] Hulu (Video) Plugin for XBMC

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
Voinage Offline
Banned
Posts: 846
Joined: Mar 2008
Location: England
Post: #31
It is possible Rw just a lot of " Os " checking so unless you really want it - I wouldn`t advise it.

Once my unified plugin is released i`ll look at it in further detail - edited that.
It`s going to be a nightmare.
(This post was last modified: 2008-12-14 23:35 by Voinage.)
find
angrycamel Offline
Senior Member
Posts: 234
Joined: Dec 2008
Reputation: 8
Sad   
Post: #32
rwparris2 Wrote:Nope, not possible.

Ok, well it would have been nice.

Integrating with XBMC through the JSON-RPC interface?

Try the JSON-RPC Browser

[Image: hUryuD3.png]
find
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,333
Joined: Jan 2008
Reputation: 2
Location: US
Post: #33
angrycamel Wrote:Is it possible to have the shows integrate with the TV Shows library view of XBMC? For instance, when I select Family Guy I would like for it to show all seasons and episodes whether I have a copy of it on my server or not. When I select an episode to play, it would pick the local file if it exists and stream from Hulu if not. Is this level of integration possible with a video plugin with the content set to tv?

I am looking forward to the next version. Smile

Voinage Wrote:It is possible Rw just a lot of " Os " checking so unless you really want it - I wouldn`t advise it.

Once my unified plugin is released i`ll do it.

I can think of one really complex way of doing it that probably wouldn't work well at all. Feel free to PM me/make a new thread if you want to brainstorm on the possibilities of this, because I'd really like it as well... but not so much that I want to code it Laugh

I'm interested to see how you're planning on launching streams from inside the main library.

Quote:Ok, well it would have been nice.
We'll have to see what Voinage has in store for us.

PS -- I was working on scraping the site, but I hit a snag.
After I get the content ID, when I try to grab a url like http://r.hulu.com/videos?content_id=12244285 I get a 404 unless I open it in my browser first, then everything is OK for the entire season of that episode... Anyone have any ideas?

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
(This post was last modified: 2008-12-14 23:36 by rwparris2.)
find
MDPauley Offline
Senior Member
Posts: 263
Joined: Mar 2004
Reputation: 0
Location: Centreville, Va
Post: #34
rwparris2 Wrote:PS -- I was working on scraping the site, but I hit a snag.
After I get the content ID, when I try to grab a url like http://r.hulu.com/videos?content_id=12244285 I get a 404 unless I open it in my browser first, then everything is OK for the entire season of that episode... Anyone have any ideas?

Need a cookie maybe? From boxee's hulu app

Code:
import random
import os.path
import urllib2
import Cookie
import xbmc
import xbmcgui
import datetime

def login_hulu(user, password):
    url = 'https://secure.hulu.com/account/authenticate?' + `random.randint(100000000, 999999999)`
    user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
    headers = { 'User-Agent': user_agent,
            'Cookie': 'login=' + user + '; password=' + password + ';',
            'Referer':  'http://www.hulu.com/'}
    req = urllib2.Request(url, None, headers)
    response = urllib2.urlopen(req)

    C = Cookie.SimpleCookie()
    C.load(response.info()['Set-Cookie']);
    return C['_hulu_session_id'].value, C['_hulu_uid'].value

username = xbmc.getInfoLabel('App.String(username)')
password = xbmc.getInfoLabel('App.String(password)')
session = ""
uid = ""
if username and password:
    session, uid = login_hulu(xbmc.getInfoLabel('App.String(username)'), xbmc.getInfoLabel('App.String(password)'))
if not session:
    xbmc.executebuiltin('App.Reset(expiry)')
    xbmc.executebuiltin('App.Reset(username)')
    xbmc.executebuiltin('App.Reset(password)')
    dialog = xbmcgui.Dialog()
    dialog.ok('hulu', 'Login failed.', 'Wrong username or password.')
else:
    print session
    print uid
    xbmc.executebuiltin('App.SetString(session,%s)' % session)
    xbmc.executebuiltin('App.SetString(uid,%s)' % uid)
    today = datetime.date.today()
    xbmc.executebuiltin('App.SetString(expiry,%s)' % today)
find
JCDoe Offline
Junior Member
Posts: 25
Joined: Dec 2008
Reputation: 0
Post: #35
Ok, I can't figure out what I'm doing wrong. I downloaded this plugin, as well as the latest t3ch build (dated 12/7/08), and many of the videos don't work. For instance, I attempted to play the Colbert Report from 12/8, and nothing happened. On my pc in a web browser, however, I had no trouble.

Anyone know what I'm doing wrong?
find
timdog82001 Offline
Posting Freak
Posts: 1,142
Joined: Mar 2006
Reputation: 0
Post: #36
angrycamel Wrote:Is it possible to have the shows integrate with the TV Shows library view of XBMC? For instance, when I select Family Guy I would like for it to show all seasons and episodes whether I have a copy of it on my server or not. When I select an episode to play, it would pick the local file if it exists and stream from Hulu if not.

It wouldn't really make sense for it to have ALL seasons/episodes. Hulu usually only has a few of the most recent episodes, removing older episodes as new ones come in. Anyway, I actually think that rather than the way you're proposing, I would like it better if it were to have an additional entry in the context menu or video info screen or something along those lines, labeled "Watch tvshowname on Hulu." It could then bring you to a window with separate categories for clips, webisodes, episodes, etc available on hulu. Of course one problem with this is the context menu is very full already.
find
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,333
Joined: Jan 2008
Reputation: 2
Location: US
Post: #37
timdog82001 Wrote:It wouldn't really make sense for it to have ALL seasons/episodes. Hulu usually only has a few of the most recent episodes, removing older episodes as new ones come in. Anyway, I actually think that rather than the way you're proposing, I would like it better if it were to have an additional entry in the context menu or video info screen or something along those lines, labeled "Watch tvshowname on Hulu." It could then bring you to a window with separate categories for clips, webisodes, episodes, etc available on hulu. Of course one problem with this is the context menu is very full already.

If you want this you can show support on trac, where I asked for it a few days ago.
http://trac.xbmc.org/ticket/5442

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
find
Burncycle Offline
Member
Posts: 58
Joined: Sep 2004
Reputation: 0
Post: #38
Zoltar, fantastic plugin! Thank you so much for taking this on. I thought I'd post some observations on useage. Let me know if you need logs.

If you watch a show all the way to the end, it freezes on the last frame and I need to restart the box.

No rewinding, and any fastforwarding quickly runs down the buffer which causes a lot of glitches. Typically the audio and video fall out of sync for a while.

I was watching one tv show and had it paused for a really long time (20 min maybe) and when I resumed, it played for about a second and quit to menu. I was able to replay it fine, but without the aforementioned ability to fastforward,it was a bit of a drag.

Similarly, if you navigate to the flash file, but wait a long time to start it, then it won't work. You have to back up a menu and go back in. I suspect that Hulu is using some expiring token that lasts 15mins or so.

Lastly, some shows will list the episodes, but when you select it, nothing happens. I've noticed this with Mythbusters.

That's what I've seen so far. Again, fantastic plugin and thank for your efforts. Let me know if you need anything.

PS. I'm a US user.
find
angrycamel Offline
Senior Member
Posts: 234
Joined: Dec 2008
Reputation: 8
Big Grin  Sounds like a maybe
Post: #39
rwparris2 Wrote:I can think of one really complex way of doing it that probably wouldn't work well at all. Feel free to PM me/make a new thread if you want to brainstorm on the possibilities of this, because I'd really like it as well... but not so much that I want to code it Laugh

I'm interested to see how you're planning on launching streams from inside the main library.

We'll have to see what Voinage has in store for us.

Sounds good. Let me know if there is any way I can help. I have never written Python specifically but I have years of experience in many other languages. (I even wrote an app for the Xbox a while back called Mimesis)

Integrating with XBMC through the JSON-RPC interface?

Try the JSON-RPC Browser

[Image: hUryuD3.png]
find
Rob Loach Offline
Junior Member
Posts: 27
Joined: Jul 2008
Reputation: 0
Location: Toronto, ON
Thumbs Up  SVN Repository Installer
Post: #40
You should really add this to the SVN Repo Installer: http://forum.xbmc.org/showthread.php?tid=29911
find
darkspur Offline
Junior Member
Posts: 5
Joined: Dec 2008
Reputation: 0
Post: #41
I can't get this to work:

21:21:28 M: 34877440 ERROR: CDVDDemuxFFmpeg::Open - error reading from input stream, rtmp://cp39465.hulu.com:1935/ondemand?_fcs_vh
ost=cp39465.hulu.com&auth=daEc2blaPddaPc3dyd2dBcUbzcVagdBa.aU-bjrB8I-8-0oGBsFqYBzr&aifp=NS20070910&slist=content/39484/12/684/HuluTr
anscode_53070_44444_FLASH_480K_16x9_29_97__gTF64gUAOkiGRblThRM1pQ;.international​=false
21:21:28 M: 34877440 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer

This is with a fresh install of XBMC 12-07, the one included on the AID 4.40 install.
find
angrycamel Offline
Senior Member
Posts: 234
Joined: Dec 2008
Reputation: 8
Post: #42
I just came across this thread: http://forum.xbmc.org/showthread.php?tid=34443 and posted http://forum.xbmc.org/showpost.php?p=256...stcount=13

It would be nice to have this Hulu plugin mix in with that concept of a full episode guide rather than just the episodes you have a matching video file for. It would open the door for full integration of this Hulu script and others like it into the library.

(PS. I hope I am not hijacking the thread too bad with this idea, I just want to see this streaming tv concept better integrated into XBMC and I'm hoping that this Plugin can do just that.)

Integrating with XBMC through the JSON-RPC interface?

Try the JSON-RPC Browser

[Image: hUryuD3.png]
(This post was last modified: 2008-12-15 05:46 by angrycamel.)
find
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,333
Joined: Jan 2008
Reputation: 2
Location: US
Post: #43
angrycamel Wrote:Let me know if there is any way I can help.
I welcome you to write the entire script, as I won't be doing it. PM me if you want my idea of how it MIGHT be possible.

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
find
angrycamel Offline
Senior Member
Posts: 234
Joined: Dec 2008
Reputation: 8
Post: #44
rwparris2 Wrote:I welcome you to write the entire script, as I won't be doing it. PM me if you want my idea of how it MIGHT be possible.
Ok. I started taking a look already at what is possible with the current build. I am leaning towards lower level changes to the library building code in VideoInfoScanner.cpp in order to make Hulu support and sites like it supported a bit more out of the box with the help of python (content defining) scripts like this one.

I will definitely PM you so I don't distract from this thread anymore.

Integrating with XBMC through the JSON-RPC interface?

Try the JSON-RPC Browser

[Image: hUryuD3.png]
(This post was last modified: 2008-12-15 08:14 by angrycamel.)
find
Voinage Offline
Banned
Posts: 846
Joined: Mar 2008
Location: England
Post: #45
Wonder if the Rtmp patch was ever,hmmm.

There was a patch to fix the last frame hang.
find
Thread Closed