• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 22
Release [Module] youtube-dl - multi-site playable URL resolver
#16
(2014-08-19, 15:32)ruuk Wrote:
(2014-08-19, 12:56)mujunk Wrote: Pardon my ignorance. What is the Average Joe required to do with this? I have installed your repo but couldnt find this under video addons.

This isn't for the "Average Joe". This is a module for other addons to use. It's main feature it that it converts the video URL to the actual playable video URL. One of the hardest parts of coding a video addon is to access the actual playable URL. Not only does it take some complex parsing and various tricks to accomplish, the method also needs to change occasionally to adapt to changes in the site.

The youtube-dl project works with hundreds of sites and is updated constantly for changes in those sites.

So for instance the YouTube addon recently had issues playing videos because of changes in the YouTube site. If this module had existed at that time and the YouTube addon was using it it would not have needed any intervention by the author to account for those changes, because the youtube-dl project was quickly updated.
Another example of it's usage is in my Forum Browser addon. It allows it to play video links from a variety of sites without me having to do anything but pass in the video page URL.

Sounds like clever stuff. Appreciate your time and effort in explaining. I take it that the end user need not install anything, but would be built-in by the addon developers.
Reply
#17
(2014-08-19, 21:22)mujunk Wrote:
(2014-08-19, 15:32)ruuk Wrote:
(2014-08-19, 12:56)mujunk Wrote: Pardon my ignorance. What is the Average Joe required to do with this? I have installed your repo but couldnt find this under video addons.

This isn't for the "Average Joe". This is a module for other addons to use. It's main feature it that it converts the video URL to the actual playable video URL. One of the hardest parts of coding a video addon is to access the actual playable URL. Not only does it take some complex parsing and various tricks to accomplish, the method also needs to change occasionally to adapt to changes in the site.

The youtube-dl project works with hundreds of sites and is updated constantly for changes in those sites.

So for instance the YouTube addon recently had issues playing videos because of changes in the YouTube site. If this module had existed at that time and the YouTube addon was using it it would not have needed any intervention by the author to account for those changes, because the youtube-dl project was quickly updated.
Another example of it's usage is in my Forum Browser addon. It allows it to play video links from a variety of sites without me having to do anything but pass in the video page URL.

Sounds like clever stuff. Appreciate your time and effort in explaining. I take it that the end user need not install anything, but would be built-in by the addon developers.

Yeah, this module addon gets imported by addons that require it.
Reply
#18
Hi, is this module works for the youtube playlist or channel? I have tried single video and it works. But if you pass channel or playlist url, it seems to fail saying No suitable extractor found. So, right now i have to extract the every single video link from the playlist or channel. Can you check if playlist/channel url is playable for you.

Here is the function i have:

Quote:def YDex(url):
url = 'https://www.youtube.com/channel/UCzPO5IPzbQwq4VJxejIMwMw' # This dont work
url='https://www.youtube.com/watch?v=07FYdnEawAQ' # This works
vid = YDStreamExtractor.getVideoInfo(url,resolve_redirects=True,quality=1)
print vid
choices = []
if vid.hasMultipleStreams():
for s in vid.streams():
#print 's is %s' %s
xbmc_url = s['xbmc_url']
choices.append(xbmc_url)
return choices
pass
#index += 1
vid.selectStream(choices) #You can also pass in the the dict for the chosen stream

stream_url = vid.streamURL()
return stream_url

Thanks for the help
Edit : It looks like your _blacklist is the reason it fails to extract. So, i just comment this out.
Reply
#19
(2014-09-06, 04:28)alibaba011 Wrote: Hi, is this module works for the youtube playlist or channel? I have tried single video and it works. But if you pass channel or playlist url, it seems to fail saying No suitable extractor found. So, right now i have to extract the every single video link from the playlist or channel. Can you check if playlist/channel url is playable for you.

Here is the function i have:

Quote:def YDex(url):
url = 'https://www.youtube.com/channel/UCzPO5IPzbQwq4VJxejIMwMw' # This dont work
url='https://www.youtube.com/watch?v=07FYdnEawAQ' # This works
vid = YDStreamExtractor.getVideoInfo(url,resolve_redirects=True,quality=1)
print vid
choices = []
if vid.hasMultipleStreams():
for s in vid.streams():
#print 's is %s' %s
xbmc_url = s['xbmc_url']
choices.append(xbmc_url)
return choices
pass
#index += 1
vid.selectStream(choices) #You can also pass in the the dict for the chosen stream

stream_url = vid.streamURL()
return stream_url

Thanks for the help
Edit : It looks like your _blacklist is the reason it fails to extract. So, i just comment this out.

Just saw your post - somehow I missed it.

Where is the _blacklist you mentioned?
Reply
#20
Version 14.925.0

Changes:
  • Update youtube-dl core to 2014.09.25


On my REPO.
Reply
#21
(2014-09-06, 04:28)alibaba011 Wrote: It looks like your _blacklist is the reason it fails to extract. So, i just comment this out.
I figured out what you were talking about. The variable is actually in all caps and my search was apparently case sensitive Smile

Anyway, since the addon is in the official repository now, you shouldn't need to include the module code with your addon.
Also you can just edit the _BLACKLIST in your code instead of modifying the source with:

Code:
import YDStreamExtractor
YDStreamExtractor._BLACKLIST = []

Just do that before you make any calls to the module's methods.
Reply
#22
Hello,

I think the addon is grabbing segmented files of Tudou links even though a link to the full video exist. An example would be http://www.tudou.com/v/6xMNLKMJxKQ/&reso...5_99/v.swf

The addon that I am using in addition to this script addon is the baykoreans addon.

http://219.224.102.8/f4v/81/210644981.h2...8Chrome%29

This is the resolved url, and you can notice _seg_ in the url, meaning it is a segmented video. Is this fixable?

Thank you!
Reply
#23
How can i play video files from another sites? I don't get it :/ Sry i'm nb
Reply
#24
This isn't meant for end-users, but more for the addon coders.
Reply
#25
(2014-10-25, 19:01)Skipmode A1 Wrote: This isn't meant for end-users, but more for the addon coders.
Thanks for answering Smile
(2014-10-25, 15:46)Chiitus Wrote: How can i play video files from another sites? I don't get it :/ Sry i'm nb
An example of how this is used is in my Forum Browser addon. It allows it to play video links in forum posts. Also the Pushbullet addon that muttley and I are working on let's you push video links to Kodi and this module allows it to play them.
Reply
#26
(2014-10-17, 06:19)ssy080 Wrote: Hello,

I think the addon is grabbing segmented files of Tudou links even though a link to the full video exist. An example would be http://www.tudou.com/v/6xMNLKMJxKQ/&reso...5_99/v.swf

The addon that I am using in addition to this script addon is the baykoreans addon.

http://219.224.102.8/f4v/81/210644981.h2...8Chrome%29

This is the resolved url, and you can notice _seg_ in the url, meaning it is a segmented video. Is this fixable?

Thank you!

In case anyone wonders, this was answered HERE.
Reply
#27
Information 
Version 14.1026.0

Changes:
  • Update youtube-dl core to 2014.10.26


On my REPO.

Also pushed to official repository, pending mirrors update.
Reply
#28
thanks for your work ruuk i use to live in the 3 6 0 to back in the day went to Olympic grad in 02
Reply
#29
Also wanted to put out a quick "thanks". Smile
DIdnt know of this module since last week, I use it now mainly to display trailers in my ExtendedInfo Script, so I don´t have to rely on the youtube plugin anymore. Smile
Cheers
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#30
Hi i tried to use this addon in addition with your pushbullet addon to send video hosting url to play from firefox to xbmc.
I have succesfully installed your repo, installed pushbullet and configure it and it working. But i can't find youtube-dl addon on your repo and sending for example youtube link via pushbullet doesnt work i just got a loading message on xmbc and nothing after. Going to pushbullet addon on xbmc the video link appear but clicking on it give me a no handler for this type af push error. I'm little lost here can anyone help me.
I'm using xbmc 13 on manjaro linux.
Edit : downloaded extension from here https://ruuks-repo.googlecode.com/svn/tr...outube.dl/ and installed from zip worked.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 22

Logout Mark Read Team Forum Stats Members Help
[Module] youtube-dl - multi-site playable URL resolver2