• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 22
Release [Module] youtube-dl - multi-site playable URL resolver
(2017-11-11, 04:22)Trespasser Wrote: Hi ruuk,
Do the same options within youtube-dl (that I use on my Ubuntu 16.04 laptop) work with script.module.youtube.dl? If so, how would I use them? A short example would be nice...Smile.

Presently I using...

youtube-dl -f 94 -g https://www.youtube.com/watch?v=lcIeuqyTM94

to stream a SD m3u8.

I use...

youtube-dl --list-formats https://www.youtube.com/watch?v=lcIeuqyTM94

to list the formats.

It works perfect on my laptop, but I'd like to do the same within Kodi on my RPi3.

Thanks for your time.

Bob
The short answer is no. This add-on is intended primarily as a module that other add-ons can use to resolve site URLs. There is no user facing functionality for any advanced youtube-dl options.
Reply
(2017-11-17, 20:10)twilight0 Wrote: Is it possible for youtube-dl to load custom/private plugins from another directory?
No. I'm not aware of any plugin functionality within youtube-dl for which which this add-on is a wrapper.
Reply
Hello!  I installed  youtube-dl addon on my android tv box kodi , but when i open it, from the menu  the only tab that seems to work is Settings . Other options ar not highlighted. Do i have to install smth else?
Oh, just another question : Will it capture/record my favorite internet radios ?  Or is it just for videos?
Reply
The options in the menu are mostly for controlling downloads that an add-on using the module have started so they will be disabled unless that has happened. Also, I'm not sure if youtube-dl handles any audio sources.
Reply
(2017-11-18, 01:51)ruuk Wrote:
(2017-11-17, 20:10)twilight0 Wrote: Is it possible for youtube-dl to load custom/private plugins from another directory?
No. I'm not aware of any plugin functionality within youtube-dl for which which this add-on is a wrapper.  

Thank you. Also... Does stream.hasMultipleStreams() function work? I think it doesn't, perhaps I should post an issue at github.

EDIT: Done: https://github.com/ruuk/script.module.yo.../issues/27
Reply
I can't download any video in a fresh osmc install (raspberry). Here is the log:
Code:

20:05:12.415 T:1323820016 WARNING: Attempt to use invalid handle -1
20:05:14.508 T:1323820016 WARNING: Previous line repeats 4 times.
20:05:14.508 T:1323820016  NOTICE: script.module.youtube.dl: youtube_dl core version: 2017.07.09
20:05:35.383 T:1340597232 WARNING: CPythonInvoker(16): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
20:05:39.336 T:1340597232  NOTICE: script.module.youtube.dl: youtube_dl core version: 2017.07.09
20:05:39.341 T:1340597232  NOTICE: script.module.youtube.dl: DOWNLOAD SERVICE: START
20:05:39.347 T:1340597232  NOTICE: script.module.youtube.dl: Loading from queue. #1 this session
20:05:40.318 T:1323820016   ERROR: [debug] Encodings: locale UTF-8, fs UTF-8, out missing (instance), pref UTF-8
20:05:40.319 T:1323820016   ERROR: [debug] youtube-dl version 2017.07.09
20:05:40.420 T:1323820016   ERROR: Exception in thread Thread-1:
                                            Traceback (most recent call last):
                                              File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
                                                self.run()
                                              File "/usr/lib/python2.7/threading.py", line 763, in run
                                                self.__target(*self.__args, **self.__kwargs)
                                              File "/home/osmc/.kodi/addons/script.module.youtube.dl/lib/YDStreamExtractor.py", line 320, in _handleDownload
                                                result = download(info, util.TMP_PATH)
                                              File "/home/osmc/.kodi/addons/script.module.youtube.dl/lib/YDStreamExtractor.py", line 409, in download
                                                ytdl = YoutubeDLWrapper._getYTDL()
                                              File "/home/osmc/.kodi/addons/script.module.youtube.dl/lib/YoutubeDLWrapper.py", line 314, in _getYTDL
                                                _YTDL = YoutubeDLWrapper({'verbose': True})
                                              File "/home/osmc/.kodi/addons/script.module.youtube.dl/lib/YoutubeDLWrapper.py", line 190, in __init__
                                                youtube_dl.YoutubeDL.__init__(self, *args, **kwargs)
                                              File "/home/osmc/.kodi/addons/script.module.youtube.dl/lib/youtube_dl/YoutubeDL.py", line 403, in __init__
                                                self.print_debug_header()
                                              File "/home/osmc/.kodi/addons/script.module.youtube.dl/lib/youtube_dl/YoutubeDL.py", line 2176, in print_debug_header
                                                platform.python_version(), platform_name()))
                                            AttributeError: 'module' object has no attribute 'python_version'
20:05:40.460 T:1340597232  NOTICE: script.module.youtube.dl: DOWNLOAD SERVICE: FINISHED

I've tried different regional utf8 configs with no luck. 

locale command return this:
Code:
 LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Any ideas?

Thanks in advance!
Reply
Code:
platform.python_version(), platform_name()))
AttributeError: 'module' object has no attribute 'python_version'

This is the actual error. It looks like some sort of problem with your install, because the platform module most definitely has python_version().
Reply
(2017-11-26, 00:58)ruuk Wrote:
Code:
platform.python_version(), platform_name()))
AttributeError: 'module' object has no attribute 'python_version'

This is the actual error. It looks like some sort of problem with your install, because the platform module most definitely has python_version(). 
 It's a fresh osmc install. I've made a test.py and print platform.python_version() returns 2.7.9 with no errors. Don't you think the first error line would be the cause of the exception below? 

20:05:40.318 T:1323820016   ERROR: [debug] Encodings: locale UTF-8, fs UTF-8, out missing (instance), pref UTF-8
20:05:40.319 T:1323820016   ERROR: [debug] youtube-dl version 2017.07.09
20:05:40.420 T:1323820016   ERROR: Exception in thread Thread-1:  
...
Reply
(2017-11-26, 02:48)marcoant Wrote:
(2017-11-26, 00:58)ruuk Wrote:
Code:
platform.python_version(), platform_name()))
AttributeError: 'module' object has no attribute 'python_version'

This is the actual error. It looks like some sort of problem with your install, because the platform module most definitely has python_version().    
 It's a fresh osmc install. I've made a test.py and print platform.python_version() returns 2.7.9 with no errors. Don't you think the first error line would be the cause of the exception below? 

20:05:40.318 T:1323820016   ERROR: [debug] Encodings: locale UTF-8, fs UTF-8, out missing (instance), pref UTF-8
20:05:40.319 T:1323820016   ERROR: [debug] youtube-dl version 2017.07.09
20:05:40.420 T:1323820016   ERROR: Exception in thread Thread-1:  
...   

Running python outside of OSMC vs inside of OSMC is not the same thing. I understand that you have a fresh OSMC install but this is the first time this error has been reported and this version is four months old, so it looks like something is wrong with the install because of the nature of the error, and the fact that you are the only one with this error. This could be an OSMC bug as well. Also, please note that this add-on is supported on Kodi, and while the media player in OSMC is based on Kodi, it is not Kodi.

It looks like you must have 'Enable youtube-dl verbose logging' enabled. The 'Encodings' and version info are part of debug output for youtube-dl and are informational (in other words, they are not actual errors), and should only be showing (as far as I know) when that is enabled. It also appears the code that is causing this error can only occur when this is enabled. Please make sure that it is not enabled. If you do need to disable it and afterwards have a different error, please share a log. I need the whole log so either use a paste service or, if you like, I can PM you an email address to send it to.
Reply
(2017-11-26, 23:59)ruuk Wrote:
(2017-11-26, 02:48)marcoant Wrote:
(2017-11-26, 00:58)ruuk Wrote:
Code:
platform.python_version(), platform_name()))
AttributeError: 'module' object has no attribute 'python_version'

This is the actual error. It looks like some sort of problem with your install, because the platform module most definitely has python_version().      
 It's a fresh osmc install. I've made a test.py and print platform.python_version() returns 2.7.9 with no errors. Don't you think the first error line would be the cause of the exception below? 

20:05:40.318 T:1323820016   ERROR: [debug] Encodings: locale UTF-8, fs UTF-8, out missing (instance), pref UTF-8
20:05:40.319 T:1323820016   ERROR: [debug] youtube-dl version 2017.07.09
20:05:40.420 T:1323820016   ERROR: Exception in thread Thread-1:  
...     

Running python outside of OSMC vs inside of OSMC is not the same thing. I understand that you have a fresh OSMC install but this is the first time this error has been reported and this version is four months old, so it looks like something is wrong with the install because of the nature of the error, and the fact that you are the only one with this error. This could be an OSMC bug as well. Also, please note that this add-on is supported on Kodi, and while the media player in OSMC is based on Kodi, it is not Kodi.

It looks like you must have 'Enable youtube-dl verbose logging' enabled. The 'Encodings' and version info are part of debug output for youtube-dl and are informational (in other words, they are not actual errors), and should only be showing (as far as I know) when that is enabled. It also appears the code that is causing this error can only occur when this is enabled. Please make sure that it is not enabled. If you do need to disable it and afterwards have a different error, please share a log. I need the whole log so either use a paste service or, if you like, I can PM you an email address to send it to.  
 You were right about the error when enabling verbose logging. The script is working fine after disabling it!!! What I don't know is what was the error in the first place and how it was solved. I mean I enabled verbose logging because I couldn't get the script to work at first. I even reinstalled osmc again. Maybe the first osmc install had any problem and maybe the second install was ok but as I directly enabled verbose logging this time I couldn't get it to work too. 

Thanks very much!
Reply
Hi, I am trying to build my own addon to play videos from rutube.
What I would like to do is to stream the video without downloading it.
The problem is that youtube-dl returns an unplayable link for rutube
videos and therefore also your module gives a wrong url to feed to kodi.
An example of video is the following:

https://rutube.ru/video/a4cb97ea46c570bc...ype=source

If I feed it into youtube-dl it downloads it without problem, however if I use the -g option to get
the url it gives an unplayable url.

Therefore I guess that the best approach would be to use the download function
of your module and play the video while it is downloading.
However, I haven't managed to understand how to get the path of the downloaded file
and play it while it is downloading.

It's the first addon I am writing for kodi and I am not properly a developer therefore
I am sorry if this is a very noob question...
Reply
(2017-11-28, 09:54)positronik Wrote: Hi, I am trying to build my own addon to play videos from rutube.
What I would like to do is to stream the video without downloading it.
The problem is that youtube-dl returns an unplayable link for rutube
videos and therefore also your module gives a wrong url to feed to kodi.
An example of video is the following:

https://rutube.ru/video/a4cb97ea46c570bc...ype=source

If I feed it into youtube-dl it downloads it without problem, however if I use the -g option to get
the url it gives an unplayable url.

Therefore I guess that the best approach would be to use the download function
of your module and play the video while it is downloading.
However, I haven't managed to understand how to get the path of the downloaded file
and play it while it is downloading.

It's the first addon I am writing for kodi and I am not properly a developer therefore
I am sorry if this is a very noob question...
 The instructions for using this module are in the first post of this thread. Generally speaking, if you can give one of a site's URLs to youtube-dl and it downloads, you can use the instructions in the first post with the same URLs and it should work just fine. You shouldn't need to worry about command line options. This module gives back URL strings that are ready to pass to Kodi for streaming, meaning the User-Agent is already added which is often important to make a stream actually accessible.
Reply
(2017-11-29, 07:56)ruuk Wrote:
(2017-11-28, 09:54)positronik Wrote: Hi, I am trying to build my own addon to play videos from rutube.
What I would like to do is to stream the video without downloading it.
The problem is that youtube-dl returns an unplayable link for rutube
videos and therefore also your module gives a wrong url to feed to kodi.
An example of video is the following:

https://rutube.ru/video/a4cb97ea46c570bc...ype=source

If I feed it into youtube-dl it downloads it without problem, however if I use the -g option to get
the url it gives an unplayable url.

Therefore I guess that the best approach would be to use the download function
of your module and play the video while it is downloading.
However, I haven't managed to understand how to get the path of the downloaded file
and play it while it is downloading.

It's the first addon I am writing for kodi and I am not properly a developer therefore
I am sorry if this is a very noob question...
 The instructions for using this module are in the first post of this thread. Generally speaking, if you can give one of a site's URLs to youtube-dl and it downloads, you can use the instructions in the first post with the same URLs and it should work just fine. You shouldn't need to worry about command line options. This module gives back URL strings that are ready to pass to Kodi for streaming, meaning the User-Agent is already added which is often important to make a stream actually accessible.  
Thanks for your answer, unfortunately the links that the module provides for rutube are not playable and the player returns 'Failed to recognize file format'.
This problem arises from the fact that youtube-dl provide the wrong link to be played.
However both your addon and youtube-dl download it correctly if I use the download function.
You can see it by yourself with the link in my previous post.

EDIT: I think I have found a solution. Basically your module return the url of the best quality that happens to be a f4m file for rutube's videos and Kodi can't play it. The next-to-best video quality is an m3u file and Kodi can play it. It would be awesome if you would add the format selection in your module, in the meantime I am using a custom function written by myself. If you want I can share it with you.
Reply
The latest version in the repo (17.709.0) is based on youtube-dl core 2017.07.09, which is not compatible with many websites any more.

First post says that the add-on is "designed to be updated by dropping in the youtube-dl core without modification".

I'm unsure how to do that - can somebody explain please?

Thank you!
Reply
hi,
first of all great addon thanks.

i have aproblem with some playlist i get:
"_getYoutubeDLVideo() failed::getVideoInfo (374) - 'format_id'"

dont realy know why?
can you help please
thanks,
here is the code:

'''
import YDStreamExtractor
url = 'https://www.youtube.com/watch?v=ZOYQ94ylTGY&list=RDZOYQ94ylTGY'## This dont work
url='https://www.youtube.com/watch?v=2Vv-BfVoq4g&list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG'#this works.
YDStreamExtractor._BLACKLIST = []

vid = YDStreamExtractor.getVideoInfo(url,resolve_redirects=True,quality=1)
logging.warning( vid)
choices = []
if vid.hasMultipleStreams():
    for s in vid.streams():
    #print 's is %s' %s
        xbmc_url = s['xbmc_url']
        choices.append(xbmc_url)


ret = xbmcgui.Dialog().select("בחר סרטון", choices)
'''

thank you very much
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 22

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