Kodi Community Forum
[RELEASE] YouTube (Video) Plugin - De facto default standard YouTube Addon for XBMC - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] YouTube (Video) Plugin - De facto default standard YouTube Addon for XBMC (/showthread.php?tid=79487)



- Nektarios - 2010-11-25 00:41

HenrikDK Wrote:Theres already a find similar in the current beta version you can find on the site: http://code.google.com/p/youtubexbmc/


Again this should already be implemented in the current beta from the site


This is already on the todo for beta 1.9.5

Nice! Well done! Big GrinBig Grin


- TobiasTheCommie - 2010-11-25 00:51

master.lincoln Wrote:I'm currently looking for a way to send a link to xbmc remotely to make xbmc play that link.

Mainly I'd like to be able to transmit a youtube url via network to the xbmc machine and then the video starts playing.

There was this Firefox extension XBMCfox and a greasemonkey script that tried to get the url of the flv and then used the (deprecated) http api of xbmc to make it play the video. But both stopped working long time ago.

Nowadays one could use the json rpc api but I was too retarded to get the actual video url (of the flv) scraped to send it to xbmc.

I wonder if there would be a way to send a link (like http://www.youtube.com/watch?v=1234567) to your addon and make it care for the rest.
Or instead (if that's not possible. At least I couldn't find an easy way) point me to the right direction so I can scrape the video url by myself and use the rpc api.

Thanks in advance
Lincoln

You could try taking a look at this:

Popeye Wrote:@HenrikDK , thank you , THANK you, thank YOU!

With your help I have now managed to create a simple addon parsing and listing a rss feed with links to youtube and vimeo. Clicking a youtube video link launches your excellent addon.

Code:
def playVideo(params):
    get = params.get
    videoType = get("videotype")
    videoId = get("videoid")
    url = ""
    if (videoType == "youtube"):
        url = "plugin://plugin.video.youtube.beta/?action=play_video&videoid=%s" % videoId
        
    if (videoType == "vimeo"):
        url = "plugin://plugin.video.vimeo/?mode=2&videoID=%s" % videoId
    
    xbmc.executebuiltin("xbmc.PlayMedia("+url+")")

-time to sleep Tongue

That should work with sending just the youtube id ie (1234567) not the entire url.


- HenrikDK - 2010-11-25 00:59

Nektarios Wrote:Nice! Well done! Big GrinBig Grin


HenrikDK Wrote:
Nektarios Wrote:I would ask for some feature requests please, that should not be too difficult to do. I can program it myself if you could help me out a little.

1. Introduce a "Find related videos" option on the context menu of a video.
Theres already a find similar in the current beta version you can find on the site: http://code.google.com/p/youtubexbmc/

Ok Tobias just hit me over the head with this one, i probably misunderstood what you we're saying. Currently "Find similar" searches for the the title of the video to find alternate videos (like a regular search), but youtube implements an api call to show the related videos from a given video id (theses are selected algorithmically by youtube so its not really a search), this is currently not implemented. But i've added it to the todo Smile


- HenrikDK - 2010-11-25 01:18

Drir Wrote:Wondering if it's at all possible to give priority play to local content.

What I mean is for example you have a playlist or a trailer video you liked and downloaded earlier. Whenever you go back to that playlist or video it immediately plays local content first. Rather then downloading over and over again.
We'll look into creating some sort of local cache but it will have certain gotchas (will basically only work as long as the video is not renamed and placed in the download folder), but its added to the todo.

Drir Wrote:Also I was thinking about starting to organize these videos into folders, so if it was possible for a recursive search or something. It would be useful.
I'm not quite sure what you mean by this could you explain?


- Nektarios - 2010-11-25 01:34

HenrikDK Wrote:Ok Tobias just hit me over the head with this one, i probably misunderstood what you we're saying. Currently "Find similar" searches for the the title of the video to find alternate videos (like a regular search), but youtube implements an api call to show the related videos from a given video id (theses are selected algorithmically by youtube so its not really a search), this is currently not implemented. But i've added it to the todo Smile

OK, but even with this approach it works nice. Can you keep both options?


- Drir - 2010-11-25 04:54

I just meant is it possible to have it search a Folder and all folders within. Because I am wanting to group some videos together. Getting unruly in the one folder.


- HenrikDK - 2010-11-26 11:31

Drir Wrote:I just meant is it possible to have it search a Folder and all folders within. Because I am wanting to group some videos together. Getting unruly in the one folder.

If we do implement a caching system based on previously downloaded files, it will not be searching through files as there are too many problems with filenames, doubles and increasing search time. It will probably instead maintain and internal index over the files in your download folder, which means the caching won't work if you move or rename the files.


- Drir - 2010-11-26 14:05

HenrikDK Wrote:If we do implement a caching system based on previously downloaded files, it will not be searching through files as there are too many problems with filenames, doubles and increasing search time. It will probably instead maintain and internal index over the files in your download folder, which means the caching won't work if you move or rename the files.

I see... This is where the whole "I wish they scraped youtube videos" comes in. Because this plugin has opened my eyes to how broadly youtube can be used. Seriously It can be it's own TV station.
Either way mate, you are doing an over the top job. And thanks for the support you have given so far.


- HenrikDK - 2010-11-26 14:52

Drir Wrote:I see... This is where the whole "I wish they scraped youtube videos" comes in. Because this plugin has opened my eyes to how broadly youtube can be used. Seriously It can be it's own TV station.
Either way mate, you are doing an over the top job. And thanks for the support you have given so far.

Ideally I would much rather like to see XBMC implement a much more intelligent caching system for all web streams (that way every plugin dev wouldn't need to worry themselves with that stuff). I was basically thinking of a system where XBMC would auto-magically store any video played from an http address for a certain amount of time or until the available cache space ran out, that way the user would only have caching problems on the first run. On the surface this solution sounds pretty simple but I'm suspecting that the problem is much more complex when you get down into the details.


- Drir - 2010-11-28 11:02

Im sure its something that would be needing some attention fairly soon.


- gott_sei_dank - 2010-11-30 01:42

What I'm about to ask seems as if it should be so simple, except that exact terminology might elude me. I would like an easy way to view the Khan Academy channel (http://www.youtube.com/user/khanacademy#g/p).

It is a collection of playlists of over 1800 videos, what I would like is a way to navigate the videos as in the following example, I used to have a way of doing this using Navi-X but an API change put an end to it.

Khan Academy channel > playlist (eg. Biology or Algebra) > individual video

Is there a way to achieve this using Alternative YouTube plugin, the Khan Academy is gaining momentum receiving $2 million from Google's Project 10^100 which was matched by The Gates Foundation and is an incredible resource which I would like to access from the comfort of my sofa. Thanks!


- Drir - 2010-11-30 08:37

That's an awesome channel mate.
And Id bump that idea to add playlist support in the individual channels section.


- Drir - 2010-11-30 08:50

You know what looking over the amount of curriculum and the varying degree of levels to his tutorials. It would probably be best for this to be a plugin on it's own.


- HenrikDK - 2010-11-30 22:44

gott_sei_dank Wrote:What I'm about to ask seems as if it should be so simple, except that exact terminology might elude me. I would like an easy way to view the Khan Academy channel (http://www.youtube.com/user/khanacademy#g/p).

It is a collection of playlists of over 1800 videos, what I would like is a way to navigate the videos as in the following example, I used to have a way of doing this using Navi-X but an API change put an end to it.

Khan Academy channel > playlist (eg. Biology or Algebra) > individual video

Is there a way to achieve this using Alternative YouTube plugin, the Khan Academy is gaining momentum receiving $2 million from Google's Project 10^100 which was matched by The Gates Foundation and is an incredible resource which I would like to access from the comfort of my sofa. Thanks!

Drir Wrote:That's an awesome channel mate.
And Id bump that idea to add playlist support in the individual channels section.

Playlist support for channel subscriptions is added to the todo, but looking at the khan academy site i have a feeling that even this will be insufficient to properly browse all that content Smile


- gott_sei_dank - 2010-12-02 12:14

Thanks for the reply HenrikDK, on a different matter is it fair to say that you need an account @YouTube to get the most from this plugin, the reason I ask is the login credentials would be the same for my main Google Account, not that i don't trust you or anything Tongue