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)



YouTube Plug-in Thread - DarrenHill - 2019-03-10

@cnwoods - no support is offered on this forum for any device containing banned addons (wiki), in violation of our piracy policy (wiki) and the forum rules (wiki) that you accepted and agreed to abide by when you signed up here.

The forum moderators have determined that banned addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.


RE: YouTube Plug-in Thread - cnwoods - 2019-03-10

My sincere apologies. I've removed all banned repos and addons. 

A new debug log is here: https://paste.kodi.tv/aworukijuy.kodi

Basically, I just entered Kodi (with debug on), and clicked on the sign-in in Youtube. Then exited. 

TIA.


RE: YouTube Plug-in Thread - Spiderfish - 2019-03-11

Why when enable mpeg-dash for videos then the youtube videos become stuck and not stable wit buffering.
Do I have to do something in settings to solve it?


RE: YouTube Plug-in Thread - anxdpanic - 2019-03-12

@DjDiabolik 
That looks like something that would be better suited to a separate add-on, but will keep it in mind.

@Spiderfish
A complete debug log (wiki) might help show the issue.


RE: YouTube Plug-in Thread - Spiderfish - 2019-03-12

@anxdpanic 

here is the log details: YouTube Logs


RE: YouTube Plug-in Thread - Kovatch - 2019-03-13

Hi all,

I recently got an ATV1 working with osmc.  The youtube add-on is awesome and I'm quite happy with how it's working on this thing (only live streams don't work though everything else seems really great, it's version 6.4.0).  I ordered a used cheap Broadcom CrystalHD card shipped from Thailand and I think it broke in shipping sadly as it doesn't appear to be working.

After reading some of this it seems I need Inputadaptive and I do have it though it's version 2.0.10.  I tried updating the version and it says there's no update available and that live streams only work with 2.0.12.  Do any of you think it's possible for me to get live streams working (maybe with a CrystalHD card)?

Regardless, I really appreciate all the work that went into this.


RE: YouTube Plug-in Thread - cnwoods - 2019-03-13

Re: https://forum.kodi.tv/showthread.php?tid=325740&pid=2832080#pid2832080

I'd be really grateful if someone could take a look at this. I've submitted a clean debug log (and edited the above post to reflect this). I'm unable to access youtube at all, as mentioned in the post.

This has been a problem for some time -- and it's got me completely stumped. 

Thanks.


RE: YouTube Plug-in Thread - HTGeek - 2019-03-13

Have you tried following these instructions, from a fresh Kodi 18 install?

YOUTUBE PERSONAL API KEY INSTRUCTIONS by jmh2002

That's the most relevant and complete guide that worked for me. Note the key instructions at the very bottom of the post. The UI in Google's dev portal has changed slightly since this was written, but not much.

jmh2002's guide solves the problem where you are sharing the built-in API keys with everyone else in the world with Kodi and using the same built-in key. Google limits the API usage to a certain number of logins per day (I believe it's something like 100). Apple has a similar practice with their app testing protocols, FWIW. This is a standard practice in enterprise software dev. The best way around it is to create your own set of API keys, which is free.

Now, that may or may not be at the root of your problem, but if you follow that guide with a fresh Kodi v18/Leia install, it should work. Your issue could also be related to leftover code or improperly deleted or modified code related to one of the non-approved apps you previously installed. I would start over with a fresh build regardless, and well... start over.


RE: YouTube Plug-in Thread - cnwoods - 2019-03-13

(2019-03-13, 15:35)HTGeek Wrote: Have you tried following these instructions, from a fresh Kodi 18 install?
YOUTUBE PERSONAL API KEY INSTRUCTIONS by jmh2002
 Yes, I was wondering about that. But at the beginning it states:
 
Quote:NB: These instructions are meant for existing users with a working, signed in, and activated YouTube addon.
They are not meant to help you install, setup, sign in, or activate the YouTube addon itself if you are a first time user.

Please install, setup, sign in, activate and test the YouTube addon first, before creating your own Personal API Keys.

Which put me off trying it.  However, I'm prepared to try anything at this point, so I'll report back later when I've tried it, and from a clean Kodi setup.

Thanks.


RE: YouTube Plug-in Thread - cnwoods - 2019-03-13

No luck I'm afraid.

I moved my old ~/.kodi/ directory out of the way and created a new one. After adding sources and updating music and video libraries, I added Youtube. Then I created the API and client keys and added them. 

I'm still getting a  LoginException  [400]: invalid_request, with the settings screen overlaying the sign-in every time I try to sign in, and a Youtube: forbidden clicking other youtube links.


RE: YouTube Plug-in Thread - HTGeek - 2019-03-13

(2019-03-13, 17:53)cnwoods Wrote:
(2019-03-13, 15:35)HTGeek Wrote: Have you tried following these instructions, from a fresh Kodi 18 install?
YOUTUBE PERSONAL API KEY INSTRUCTIONS by jmh2002
 Yes, I was wondering about that. But at the beginning it states:
 
Quote:NB: These instructions are meant for existing users with a working, signed in, and activated YouTube addon.
They are not meant to help you install, setup, sign in, or activate the YouTube addon itself if you are a first time user.

Please install, setup, sign in, activate and test the YouTube addon first, before creating your own Personal API Keys.

Which put me off trying it.  However, I'm prepared to try anything at this point, so I'll report back later when I've tried it, and from a clean Kodi setup.

Thanks. 
 Yeah, true. I'm not sure what he meant by that or why he added that statement. It's very difficult to get connected to YT using the developer API keys that come with the app. Quite frankly, it ought to just require users to create their own. This is a function of limitations set by Google. My point is that in order to actually sign in and activate the YouTube app, you will most likely have to go the API creation route. Anyone who gets in without that is just plain lucky.

I found jmh2002's guide was the only one that worked for me, mostly because his was the only guide I found that accurately describes the process, explains how you acquire and match up the 3 pieces of data required, and explains the registration process with YT that connects your Google account to your Kodi install, which is the last step to make the magic happen. I've also confirmed that restarting the box, YT connectivity still works. As long as you don't mess with the pairing process, it will retain the info on restart. If you wish to change the user, you will have to re-pair Kodi and an associated, existing Google account.


RE: YouTube Plug-in Thread - HTGeek - 2019-03-13

(2019-03-13, 19:30)cnwoods Wrote: No luck I'm afraid.

I moved my old ~/.kodi/ directory out of the way and created a new one. After adding sources and updating music and video libraries, I added Youtube. Then I created the API and client keys and added them. 

I'm still getting a  LoginException  [400]: invalid_request, with the settings screen overlaying the sign-in every time I try to sign in, and a Youtube: forbidden clicking other youtube links.
I read through your log that you posted on 3/10. What Linux distro are you running? And can you grep youtube your log and upload that (would be easier to see the specific messages)? For example,

cat logfile.txt | grep youtube


RE: YouTube Plug-in Thread - HTGeek - 2019-03-13

(2019-03-13, 19:30)cnwoods Wrote: No luck I'm afraid.

I moved my old ~/.kodi/ directory out of the way and created a new one. After adding sources and updating music and video libraries, I added Youtube. Then I created the API and client keys and added them. 

I'm still getting a  LoginException  [400]: invalid_request, with the settings screen overlaying the sign-in every time I try to sign in, and a Youtube: forbidden clicking other youtube links.
 Looking at your 3/10 log, this parts seems to reflect the meat of the issue:

2019-03-10 14:41:32.117 T:140321305589504 DEBUG: [plugin.video.youtube] Selecting YouTube config "All"
2019-03-10 14:41:32.117 T:140321305589504 DEBUG: [plugin.video.youtube] User is not logged in
2019-03-10 14:41:32.117 T:140321305589504 DEBUG: [plugin.video.youtube] Requesting device and user code: Config: |YouTube-TV| Client id [:5]: |86155|
2019-03-10 14:41:32.403 T:140321337636608 DEBUG: CWebServer[8080]: request received for /jsonrpc
2019-03-10 14:41:32.443 T:140321305589504 DEBUG: DialogProgress::Open called 2019-03-10 14:41:32.443 T:140321305589504 DEBUG: ------ Window Init (DialogConfirm.xml) ------
2019-03-10 14:41:32.443 T:140321305589504 INFO: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2019-03-10 14:41:32.448 T:140321305589504 DEBUG: [plugin.video.youtube] Requesting access token: Config: |YouTube-TV| Client id [:5]: |86155| Client secret [:5]: |SboVh|
2019-03-10 14:41:32.457 T:140321337636608 DEBUG: CWebServer[8080]: request received for /jsonrpc
2019-03-10 14:41:32.659 T:140321305589504 ERROR: [plugin.video.youtube] Requesting access token: Code: |400| JSON: |{u'error_description': u'Credentials in post body and basic Authorization header do not match', u'error': u'invalid_request'}|
2019-03-10 14:41:32.687 T:140321305589504 ERROR: [plugin.video.youtube] LoginException: [400] invalid_request: Credentials in post body and basic Authorization header do not match


Based on what I'm seeing above, the problem looks pretty clear-cut: your credentials are not matching what Google/YouTube API is expecting. So, not to sound like a broken record here, but I would strongly suggest you start over and go through the tutorial I linked above. Uninstall the YT app, restart Kodi, reinstall the app. Then before you try to sign in, go to the Google Dev site and create a brand new set of credentials. The process is somewhat confusing unless you've used Google's developer API tools before.

Make sure you assign Youtube API v3 for starters. Your Client ID will be the longest of the 3 key values. It should start with a 12-digit number, followed by a dash (-) and an alphanumeric string, and appended with .apps.googleusercontent.com

The Secret will be the shortest value. 

Also note that Google does not subscribe to some API best practices. For instance, their keys use characters such as i, I, l, o, O, and 0. Depending on the font, if you are manually copying and pasting this can easily result in errors. It's also common to mis-type or miss a character or two when transcribing manually, as many folks do in this case (Kodi).


RE: YouTube Plug-in Thread - Spiderfish - 2019-03-14

(2019-03-13, 19:30)cnwoods Wrote: No luck I'm afraid.

I moved my old ~/.kodi/ directory out of the way and created a new one. After adding sources and updating music and video libraries, I added Youtube. Then I created the API and client keys and added them. 

I'm still getting a  LoginException  [400]: invalid_request, with the settings screen overlaying the sign-in every time I try to sign in, and a Youtube: forbidden clicking other youtube links.
I had the same issue before and I followed these steps to add my API in YouTube plugin..follow these steps in this thread it's really helpful  Add your API Key in YouTube Addon


RE: YouTube Plug-in Thread - Spiderfish - 2019-03-14

Any Idea for my issue please! i already chaned to LE 9.0.1 but still the same issue is buffering and video freeze only with youtube addon the streaming is OK but the youtub addon it's not stable when i enable mpeg-dash ith high quality. log is here