Kodi Community Forum
YouTube Plug-in Thread - 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: YouTube Plug-in Thread (/showthread.php?tid=353278)



RE: YouTube Plug-in Thread - dynup - 2020-02-24

(2020-02-24, 21:51)spinmaster Wrote: Have you enabled MPEG DASH & / Inputstream.adaptive for the YouTube addon? There are plenty of instructions if you search for that combination ... if you enable both properly, you can watch in 1080p/60fps.
 

Yes, MPEG DASH and Inputstream.adaptive is installed and enabled but I cannot play 1080p! It shows as "mpd" not "mp4"!?


RE: YouTube Plug-in Thread - the_other_guy - 2020-02-25

i think it will take some one that know there way round python to check the code 
the way is see it there are parts out of date

addons.xml
<addon id="plugin.video.youtube" name="YouTube" version="6.6.0" provider-name="anxdpanic, bromix">

 youtube_authentication.py
def sign_in(addon_id):
    """
    To use the signed in context, see youtube_registration.py and youtube_requests.py
    Usage:

    addon.xml
    ---
    <import addon="plugin.video.youtube" version="6.1.0"/>
    ---

    .py
    ---
    import youtube_registration
    import youtube_authentication

def sign_out(addon_id):
    """
    Usage:

    addon.xml
    ---
    <import addon="plugin.video.youtube" version="6.1.0"/>
    ---

    .py
    ---
    import youtube_registration
    import youtube_authentication

    youtube_registration.register_api_keys(addon_id='plugin.video.example',
                                           api_key='A1zaSyA0b5sTjgxzTzYLmVtradlFVBfSHNOJKS0',
                                           client_id='825419953561-ert5tccq1r0upsuqdf5nm3le39czk23a.apps.googleusercontent.com',
                                           client_secret='Y5cE1IKzJQe1NZ0OsOoEqpu3')


RE: YouTube Plug-in Thread - anxdpanic - 2020-02-25

@dynup
A complete debug log (wiki) may show whats happening, for 1080+ it should show as mpd.

@the_other_guy
Nothing is out of date there. 6.6.0 is current, and the code you're referencing is examples for other add-ons to interact with YouTube, and the ability for developers to register developer keys.
Code:
<import addon="plugin.video.youtube" version="6.1.0"/>
means that plugin.video.youtube must be at least version 6.1.0 (those features were added in that version)


RE: YouTube Plug-in Thread - the_other_guy - 2020-02-25

it may also be a addon other then youtube
script.module.oauth.helper
lang="en">Provides simple google device OAuth handling and generic device OAuth via my server</summary>
    <description lang="en">This module provides simple OAuth handling. The module handles all user interaction.

script.module.oauth2client
ang="en_GB">OAuth 2.0 client library</summary>
    <description lang="en_GB">oauth2client is a client library for OAuth 2.0.</description>
    <disclaimer lang="en_GB">Source code from https://github.com/google/oauth2client</disclaimer>


RE: YouTube Plug-in Thread - anxdpanic - 2020-02-25

Neither of those are used by/or use the YouTube add-on, so I'm not sure what we're talking about now.


RE: YouTube Plug-in Thread - ap17 - 2020-02-25

(2020-02-18, 13:37)speedwell68 Wrote:
(2020-02-17, 23:45)jdf76 Wrote: Up to Date API Key creation for personal Use

Personal API Creation
I tried to follow that, but the screen shots given are nothing like the pages that Google are offering. 

Exactly.


RE: YouTube Plug-in Thread - frogboy07 - 2020-02-25

the youtube app stopped working today. it said my api key was no longer valid. so i went to the gethub link posted above and re-entered the api codes. no dice, it rejected them and started a contant reload loop that forced me to close kodi from the task manager. so i uninstalled the youtube app only for it to ask for the old two code entry to google.com/device which no longer exists. can someone help me get the app working again? im using kodi (latest update, just updated from the site) for PC.


RE: YouTube Plug-in Thread - Wojtek - 2020-02-25

My current status: in a quest for a half-decent YT experience on a big screen I need to delete access_manager.json and re-authorize Kodi after each and every video viewed. My playlists (Subscriptions and Watch Later) bail out with "Unauthorized client for this playlist" right after video ends.
My Google API project is "external" and "not published", which - perhaps - is the reason it gets unauthorized constantly. So I just have sent a verification request.


RE: YouTube Plug-in Thread - anxdpanic - 2020-02-25

@frogboy07 @Wojtek
I would need debug logs (wiki)

@Wojtek
You might as well delete that project (the one you requested verification on) and create a new one.
The add-on requires personal api keys now because the add-on doesn't meet the verification requirements.
It's more likely that the verification process will result in a request to take down the add-on than actually achieving anything positive.


RE: YouTube Plug-in Thread - PSYCHOUT - 2020-02-25

(2020-02-25, 16:38)anxdpanic Wrote: @frogboy07 @Wojtek
I would need debug logs (wiki)

@Wojtek
You might as well delete that project (the one you requested verification on) and create a new one.
The add-on requires personal api keys now because the add-on doesn't meet the verification requirements.
It's more likely that the verification process will result in a request to take down the add-on than actually achieving anything positive.



RE: YouTube Plug-in Thread - dynup - 2020-02-25

@anxdpanic:

Ok, I try to play 1080p (mpd) but no video is shown.

Debug log: kodi.log


RE: YouTube Plug-in Thread - anxdpanic - 2020-02-25

@dynup 

If Settings -> HTTP Server -> Listen on IP is blank, change it to 0.0.0.0
If Settings -> HTTP Server -> Listen on IP is 0.0.0.0, choose Select listen IP and choose an IP shown
If neither of those work, try changing Settings -> HTTP Server -> Listen on IP to 127.0.0.1

The changes to this section may take a minute to register.

If none of that works I will need the complete log with debugging enabled. debug log (wiki)


RE: YouTube Plug-in Thread - dynup - 2020-02-25

@anxdpanic

Listen on IP was empty, I changed it to 0.0.0.0, now it plays in 1080p. Thank you for the fast help!


RE: YouTube Plug-in Thread - Wojtek - 2020-02-26

(2020-02-25, 16:38)anxdpanic Wrote: @frogboy07 @Wojtek
I would need debug logs (wiki)

@Wojtek
You might as well delete that project (the one you requested verification on) and create a new one.
The add-on requires personal api keys now because the add-on doesn't meet the verification requirements.
It's more likely that the verification process will result in a request to take down the add-on than actually achieving anything positive.
I would have to ask for verification directly anyway, as I've been informed by Google that my project doesn't need one. A log will follow tomorrow.


RE: YouTube Plug-in Thread - Paulo Boullos - 2020-02-26

(2020-02-24, 04:13)Paulo Boullos Wrote: I always used the unofficial version because it shows the information of the date the video was posted that the official version doesn't show.
Unfortunately unofficial version 6.6.0 presents problems in the audio (crackles) when playing a video.
Does anyone know how to edit the official plugin (plugin.video.youtube-6.6.0) so that it also shows the date the video was posted?
Thanks!

Image

I found the solution. Just edit the line (# set mediatype) of utils.py

# set mediatype
video_item.set_mediatype('episode')  # using episode since all setContent is currently episode as well

utils.py -> plugin.video.youtube\resources\lib\youtube_plugin\youtube\helper\utils.py