Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inappropriate video won't play #278

Closed
Kellett opened this issue Feb 23, 2022 · 48 comments
Closed

Inappropriate video won't play #278

Kellett opened this issue Feb 23, 2022 · 48 comments

Comments

@Kellett
Copy link

Kellett commented Feb 23, 2022

When trying to play the following video I get an error "this video may be inappropriate."

https://youtu.be/uIGRizua3MA

@jonisb
Copy link

jonisb commented Feb 25, 2022

I can confirm I'm getting the same error using Kodi 18.8 youtube plugin v6.8.18
I've been collecting other videos that give me this error, that I can post if needed.

I have a workaround for viewing these videos so hadn't gotten around to do a proper issue with log.

@CommodoreCrunch
Copy link

It seems to be a change on YouTube's end because it's happening to me with videos that used to work prior to the last week or so, and it happens for seemingly all age restricted content. Same account, API key, and add-on version that used to play these videos fine. Happens regardless of how I initiate the video (through the add-on, through Kore, etc).

@neo-neo1
Copy link

I’ve experienced this issue for a long time

@anxdpanic
Copy link
Owner

The example id provided in the issue works here when logged in, but not when logged out.

Need more videos to check and debug logs. May also be acct related.

@jonisb
Copy link

jonisb commented Mar 1, 2022

I'm getting the error with these:
plugin://plugin.video.youtube/play/?video_id=HPHrKaNU32I
plugin://plugin.video.youtube/play/?video_id=rVkn-nUzBww
plugin://plugin.video.youtube/play/?video_id=Csta4JFCDPY
plugin://plugin.video.youtube/play/?video_id=k_qmkphp0yI

https://paste.kodi.tv/oqunimarur.kodi

@Doktor-X
Copy link

Doktor-X commented Mar 2, 2022

The example id provided in the issue works here when logged in, but not when logged out.

Need more videos to check and debug logs. May also be acct related.

I'm logged in in android app and on kodi addon, and on android all videos play fine, but using this same account on kodi its not so....

@Doktor-X
Copy link

Doktor-X commented Mar 2, 2022

I can confirm I'm getting the same error using Kodi 18.8 youtube plugin v6.8.18 I've been collecting other videos that give me this error, that I can post if needed.

I have a workaround for viewing these videos so hadn't gotten around to do a proper issue with log.

Hello, can you share workaround for this problem until is resolved in addon itself

@anxdpanic
Copy link
Owner

@jonisb Thanks for the videos and the log.

Unfortunately the log doesn't show anything obvious, and every single one of the videos provided so far work for my account.
So this is likely account related with YouTube/Google somehow. Will try to dig deeper as I find time.

@jonisb
Copy link

jonisb commented Mar 2, 2022

@Doktor-X
I'm using yt-dlp: https://github.com/yt-dlp/yt-dlp to get a playable url
I use EventGhost: http://www.eventghost.net/ to get what Youtube video is selected in Kodi and run yt-dlp and then send the url back to Kodi.
In EventGhost I use the xbmc2 plugin to control/interface with Kodi: http://www.eventghost.net/forum/viewtopic.php?f=9&t=1562

I'm the creator of the xbmc2 EventGhost plugin: https://github.com/jonisb/KodiEventGhost

Only yt-dlp is needed as the other details can be done differently.

@jonisb
Copy link

jonisb commented Mar 2, 2022

@anxdpanic
All I know is the videos work in the browser using the same account.
This started happening some weeks ago don't remember exactly but I know age gated videos ware working for me before.

Edit: Last time there was a problem that was fixed for me here: #228 (comment)

@Doktor-X
Copy link

Doktor-X commented Mar 2, 2022

Same for me, try this video
https://youtu.be/cmKUT9fPfpI

@Doktor-X
Copy link

Doktor-X commented Mar 2, 2022

@Doktor-X I'm using yt-dlp: https://github.com/yt-dlp/yt-dlp to get a playable url I use EventGhost: http://www.eventghost.net/ to get what Youtube video is selected in Kodi and run yt-dlp and then send the url back to Kodi. In EventGhost I use the xbmc2 plugin to control/interface with Kodi: http://www.eventghost.net/forum/viewtopic.php?f=9&t=1562

I'm the creator of the xbmc2 EventGhost plugin: https://github.com/jonisb/KodiEventGhost

Only yt-dlp is needed as the other details can be done differently.

I have found app for android https://github.com/yausername/dvd
That is based on dl-yt and i can copy and past youtube url and app will find direct link to video and then i can send that link using yatse to kodi. Problem with that is that i only can send video or audio but not bouth, but its better then nothing

@jonisb
Copy link

jonisb commented Mar 2, 2022

@Doktor-X
There usually is at least one stream that has both audio and video usually 720p that is what my solution uses.
you can use yt-dlp.exe --list-formats (video url) to get a list of supported formats for a video
format id "22" is combined 720p video+audio usually don't know if this helps with your solution

@LmarLoe
Copy link

LmarLoe commented Mar 13, 2022

Same here, age restricted videos won't play

@Doktor-X
Copy link

Now yt-dl no longer works also

@daufinsyd
Copy link

Hi, same issue here, age restricted videos won't play.

@DjDiabolik
Copy link
Contributor

Ops... I just opened a similar issue here:
#289

Apparently all this video link posted upper here i can open whitout any issue from my pc (also the video this massage).
This my case it's related in not a age video (problably) but kodi/addons report to me an errors need to verify my age or similar.

At this point i can use this insted to open a new issue... if yes sorry me :)

@Doktor-X
Copy link

Yt-dlp fix problem
yt-dlp/yt-dlp#3233
Now lets hope that we will get fix for kodi plugin also

@ErikBrown2
Copy link

Same issue here, some video's do not play and the add-on reports the message "This video may be inappropriate for some users". The video's play fine on my PC using the same account. In the add-on configuration I have safe search set to "None" and age gate is not ticked. This age gate setting appears not to make a difference, but should it be ticked or not to see the age restricted videos?

@jodo234
Copy link

jodo234 commented Apr 17, 2022

I can report the same issue :(
Two videos as an example that dont play:
https://www.youtube.com/watch?v=rR-HVSt1RhQ
https://www.youtube.com/watch?v=uuO8Yo5yZ5c

@jonisb
Copy link

jonisb commented May 11, 2022

Is there a possibility to use the yt-dlp solution as I did some testing and it works with most videos that don't work in the Youtube plugin.

@daufinsyd
Copy link

Using newpipe extractor might be a good solution ?
#263

@anxdpanic
Copy link
Owner

Im working on resolving this as I can, hopefully sooner rather than later at this point.

@Doktor-X
Copy link

I know that devs dont like this question, but did you made any progress

@anxdpanic
Copy link
Owner

anxdpanic commented Jun 23, 2022

Sadly not the progress I wanted, I did a lot when I had time and hit another wall. So I have no good news atm, and time became an issue again for a bit. It's still on the radar, seems to only affect certain account types too which doesn't help much on my end, since stuff already works. :/

@ErikBrown2
Copy link

"seems to only affect certain account types"

Can we then as a quick workaround somehow change our 'account type'?

@sivanoff
Copy link

Having this issue with this russian youtube account

@DjDiabolik
Copy link
Contributor

@ErikBrown2 i don't thinks youtube have different type of account. at first I thought that some API key created more recently they could solve the problem. I have had friends who have renewed their API keys by even making new accounts and once configured on kodi the same videos are not visible in any way.

Simply it's a stupid feature adding by youtube developers.......

@Doktor-X
Copy link

We need to find simple way of adding extracted video and audio by yt-dlp to kodi, so that we can play this sorts of videos

@macruspareto
Copy link

macruspareto commented Jul 9, 2022

Can confirm: 6.8.18 is not playing age-gates videos (cannabis-related hehe) even when logged-in (personal API keys)..... while YT-DLP does without logging in.

Right now I'm trying to analyze it with MiTM Charles Proxy.

You can join our effort, guys.

Have your Charles Proxy set up (add it's Root CA to Trusted).

Run YT-DLP with "--no-check-certificate" and your age-gated yt video url.

You gonna see the output (tons of JS code) of the intercepted client-server exchange with Youtube/Google CDN.

I'm sure it can be cut and pasted to the plugin but will take some time.

Cheers....

@dobbelina
Copy link

dobbelina commented Jul 25, 2022

Don't know if this works, but kodi actually have a "No-check-certificate" switch, |verifypeer=false added to the end of the url.
https://kodi.wiki/view/SSL_certificates#Disabling_the_check

@Doktor-X
Copy link

Is there any addon, plugin or any other metode, that can combine seperate audio and video streams into one, so that i can play files extracted by yt-dlp

@LmarLoe
Copy link

LmarLoe commented Jul 26, 2022

Is there any addon, plugin or any other metode, that can combine seperate audio and video streams into one, so that i can play files extracted by yt-dlp

Doesn't Kodi automatically merge streams when it comes to local files?

By the way, youtube-dl has a --cookies flag that allows to download inappropriate videos. Maybe the same can be implemented here as well

@RNavega
Copy link
Contributor

RNavega commented Oct 13, 2022

Is there any addon, plugin or any other metode, that can combine seperate audio and video streams into one, so that i can play files extracted by yt-dlp

It's very very complicated, but you can try doing what the add-on does when playing Mpeg DASH (MPD) content.

  1. It creates a .MPD file where the separate (AKA demuxed) audio and video stream are described:

    out_list = ['<?xml version="1.0" encoding="UTF-8"?>\n'
    '<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" '
    'xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" '
    'minBufferTime="PT1.5S" mediaPresentationDuration="PT', duration, 'S" type="static" profiles="urn:mpeg:dash:profile:isoff-main:2011">\n',
    '\t<Period>\n']
    n = 0
    for key in data:
    if "_" in key:
    key_parts = key.split("_")
    mime = key_parts[0]
    lang = key_parts[1]
    else:
    mime = key
    lang = None
    if mime in supported_mime_types:
    default = False
    if mime.endswith(default_mime_type):
    default = True
    out_list.append(''.join(['\t\t<AdaptationSet id="', str(n), '" mimeType="', mime, '" ']))
    if lang is not None:
    # Avoid default language selection as it confuses the language selection in Kodi
    default = False
    out_list.append(''.join(['lang="', lang, '" ']))
    out_list.append(''.join(['subsegmentAlignment="true" subsegmentStartsWithSAP="1" bitstreamSwitching="true" default="', str(default).lower(), '">\n']))
    if license_url is not None:
    license_url = license_url.replace("&", "&amp;").replace('"', "&quot;").replace("<", "&lt;").replace(">", "&gt;")
    out_list.append(''.join(['\t\t\t<ContentProtection schemeIdUri="http://youtube.com/drm/2012/10/10">\n', '\t\t\t\t<yt:SystemURL type="widevine">', license_url, '</yt:SystemURL>\n', '\t\t\t</ContentProtection>\n']))
    out_list.append('\t\t\t<Role schemeIdUri="urn:mpeg:DASH:role:2011" value="main"/>\n')
    for i in data[key]:
    stream_format = self.FORMAT.get(i, {})
    if 'audio' in mime:
    audio_codec = str(data[key][i]['codecs'])
    match = re.search('codecs="(?P<codec>[^"]+)"', audio_codec)
    if match:
    audio_codec = match.group('codec')
    if 'opus' == audio_codec.lower() and 'opus' not in ia_capabilities:
    discarded_streams.append(get_discarded_audio(stream_format, mime, i, data[key][i]))
    continue
    elif 'vorbis' == audio_codec.lower() and 'vorbis' not in ia_capabilities:
    discarded_streams.append(get_discarded_audio(stream_format, mime, i, data[key][i]))
    continue
    if int(data[key][i]['bandwidth']) > int(stream_info['audio']['bandwidth']):
    stream_info['audio']['mime'] = str(mime)
    if stream_format:
    bitrate = int(stream_format.get('audio', {}).get('bitrate', 0))
    if bitrate > 0:
    stream_info['audio']['bitrate'] = bitrate
    stream_info['audio']['codec'] = stream_format.get('audio', {}).get('encoding')
    if not stream_info['audio'].get('codec'):
    stream_info['audio']['codec'] = audio_codec
    stream_info['audio']['bandwidth'] = int(data[key][i]['bandwidth'])
    out_list.append(''.join(['\t\t\t<Representation id="',
    i, '" ', data[key][i]['codecs'],
    ' bandwidth="', str(data[key][i]['bandwidth']),
    '">\n']))
    out_list.append('\t\t\t\t<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>\n')
    else:
    video_codec = str(data[key][i]['codecs'])
    match = re.search('codecs="(?P<codec>[^"]+)"', video_codec)
    if match:
    video_codec = match.group('codec')
    if 'vp9.2' == video_codec.lower() and ('vp9.2' not in ia_capabilities or
    not self._context.get_settings().include_hdr()):
    if not self._context.get_settings().include_hdr() and 'vp9.2' in ia_capabilities:
    discarded_streams.append(get_discarded_video(mime, i, data[key][i], 'hdr not selected'))
    else:
    discarded_streams.append(get_discarded_video(mime, i, data[key][i]))
    continue
    elif 'vp9' == video_codec.lower() and 'vp9' not in ia_capabilities:
    discarded_streams.append(get_discarded_video(mime, i, data[key][i]))
    continue
    elif video_codec.lower().startswith(('av01', 'av1')) and 'av1' not in ia_capabilities:
    discarded_streams.append(get_discarded_video(mime, i, data[key][i]))
    continue
    has_video_stream = True
    if default:
    if int(data[key][i]['bandwidth']) > int(stream_info['video']['bandwidth']):
    stream_info['video']['height'] = str(data[key][i]['height'])
    stream_info['video']['fps'] = str(data[key][i]['frameRate'])
    stream_info['video']['mime'] = str(mime)
    stream_info['video']['codec'] = video_codec
    stream_info['video']['bandwidth'] = int(data[key][i]['bandwidth'])
    if data[key][i].get('quality_label'):
    stream_info['video']['quality_label'] = str(data[key][i]['quality_label'])
    if stream_format:
    stream_info['video']['codec'] = stream_format.get('video', {}).get('encoding')
    if not stream_info['video'].get('codec'):
    stream_info['video']['codec'] = video_codec
    video_codec = data[key][i]['codecs']
    out_list.append(''.join(['\t\t\t<Representation id="', i, '" ', video_codec,
    ' startWithSAP="1" bandwidth="', str(data[key][i]['bandwidth']),
    '" width="', str(data[key][i]['width']), '" height="',
    str(data[key][i]['height']), '" frameRate="', str(data[key][i]['frameRate']),
    '">\n']))
    out_list.append(''.join(['\t\t\t\t<BaseURL>', data[key][i]['baseUrl'], '</BaseURL>\n']))
    out_list.append(''.join(['\t\t\t\t<SegmentBase indexRange="', data[key][i]['indexRange'],
    '">\n', '\t\t\t\t\t\t<Initialization range="',
    data[key][i]['init'], '" />\n', '\t\t\t\t</SegmentBase>\n']))
    out_list.append('\t\t\t</Representation>\n')
    out_list.append('\t\t</AdaptationSet>\n')
    n = n + 1
    else:
    for i in data[key]:
    stream_format = self.FORMAT.get(i, {})
    if 'audio' in mime:
    discarded_stream = get_discarded_audio(stream_format, mime, i, data[key][i])
    else:
    discarded_stream = get_discarded_video(mime, i, data[key][i])
    discarded_streams.append(discarded_stream)
    out_list.append('\t</Period>\n</MPD>\n')
    out = ''.join(out_list)
    self._context.log_debug('Generated MPD highest supported quality found: |%s|' % str(stream_info))
    if discarded_streams:
    discarded_streams = sorted(discarded_streams, key=lambda k: k.get('audio', k.get('video', {}))['bandwidth'], reverse=True)
    self._context.log_debug('Generated MPD discarded streams: \n%s' % '\n'.join(str(stream) for stream in discarded_streams))
    if not has_video_stream:
    self._context.log_debug('Generated MPD no supported video streams found')
    filepath = '{base_path}{video_id}.mpd'.format(base_path=basepath, video_id=video_id)
    try:
    f = xbmcvfs.File(filepath, 'w')
    if PY2:
    _ = f.write(out.encode('utf-8'))
    else:
    _ = f.write(str(out))
    f.close()
    return 'http://{ipaddress}:{port}/{video_id}.mpd'.format(
    ipaddress=ipaddress,
    port=self._context.get_settings().httpd_port(),
    video_id=video_id
    ), stream_info
    except:
    return None, None

  2. It sets it up to be played with inputstream.adaptive:

    if play_item.use_dash() and context.addon_enabled('inputstream.adaptive'):
    inputstream_property = 'inputstream'
    if major_version < 19:
    inputstream_property += 'addon'
    list_item.setContentLookup(False)
    list_item.setMimeType('application/xml+dash')
    list_item.setProperty(inputstream_property, 'inputstream.adaptive')
    list_item.setProperty('inputstream.adaptive.manifest_type', 'mpd')
    if play_item.get_headers():
    list_item.setProperty('inputstream.adaptive.stream_headers', play_item.get_headers())
    if play_item.get_license_key():
    list_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha')
    list_item.setProperty('inputstream.adaptive.license_key', play_item.get_license_key())

If you can get yt-dlp to make that MPD file for your then you only need part 2, asking Kodi to play it with inputstream.adaptive.

@DjDiabolik
Copy link
Contributor

@anxdpanic for the "inappropriate video" i have problably found a workaround........ recently i have tryed to open this video:
https://www.youtube.com/watch?v=f5zyhC11hzQ

When you open it from browser it's works but when try to open it from kodi it's appears the notification say "video inappropriate....login to your and confirm your age etc etc" error.

The workaroud for watch this video from kodi it's found here.......
Used this site:
https:/deurl.com

Simply open this link for this specific video:
http://deturl.com/www.youtube.com/watch?v=f5zyhC11hzQ

Whit this site you can extract the direct link for this video............. for this video you can obtain this:
https://keepvid.works/v3/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Df5zyhC11hzQ
And this for 720P:
https://rr2---sn-nx57ynsz.googlevideo.com/videoplayback?expire=1667432500&ei=1KtiY9jrL6KSsfIPi4SQ2Ak&ip=107.161.26.213&id=o-AOOfh5uGEdteSViYLCEytGHMxYdEsuJ8RqdI4s6sZeYA&itag=22&source=youtube&requiressl=yes&mh=Vz&mm=31%2C29&mn=sn-nx57ynsz%2Csn-nx5s7n76&ms=au%2Crdu&mv=m&mvi=2&pl=23&initcwndbps=225000&vprv=1&mime=video%2Fmp4&ns=BoqXM6EVJtVMiNHkszKfgrsI&cnr=14&ratebypass=yes&dur=1748.276&lmt=1667390968341130&mt=1667410417&fvip=5&fexp=24001373%2C24007246&c=TVHTML5_SIMPLY_EMBEDDED_PLAYER&txp=4432434&n=XqDtZOEUYajDng&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIgS8GWpUlSG3mLCKY4F3gQiiH5Bc8oX3gSxo-AK8TcrZ4CIQDZwJq1ziTjnAA98wVuw9oKhc8B11MuXKMBlycEsfDvxg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAKmpEbMOUTB1s14dmqu-RQv2NM3ftGrjb8H7_ajn909fAiB_xLAKpw4qIqSB7kg2hzPXmsPi1m7NyesVSUOjuCl7fA%3D%3D

If you open this direct link from my Phone and Tablet and after that i have shared it using yatse to my Kodi...... and it's works.... video it's watchable whitout any issue.

can't you add, like, an extra function that if the video goes in error does something to get the direct link to the video?

@anxdpanic
Copy link
Owner

That's not a suitable solution to our problem sorry. I have been looking into it more though.

I haven't found any good news, but it does seem that the accounts that worked for me has used a credit card/payment method.
I can only verify this issue on my account that's never had a payment method.

You guys would have to verify if that matches with your experience to know for sure.

I will keep looking for a solution as I do other minor fixups though.

@anxdpanic anxdpanic reopened this Nov 3, 2022
@DjDiabolik
Copy link
Contributor

DjDiabolik commented Nov 5, 2022

@anxdpanic mmmm anyway it could have been a temporary patch or a temporary workaroud.
Anyway it's another strange issue..... if i understand correctly deturl.com or keepvid.works use a youtube video links to found the direct link to mp4.
isn't that the same thing that this addons do and immediatelly after "pass" this same link to resolveurl ?

Because the links generated by keepvid works and if same links it's generated by addons using the youtube API no ?
It's very weird....... it's the keepvid links contain a "our" internal API or somethig similar ?

Anyway another weird.... on my PC i have installed Internet Download Manager...... IDM when open a youtube video made the possibility to download a video from youtube site...... open same link posted above for 720P it's using this link:
https://rr1---sn-8vq54voxpu-hm2s.googlevideo.com/videoplayback?expire=1667639998&ei=XtZlY6CaJcOD-gaB-KygAQ&ip=93.147.193.104&id=o-AMShDuj1JQh_W-swah7ezmA9ie9ZQKLZG9zs3e9DB_vJ&itag=136&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398%2C399&source=youtube&requiressl=yes&vprv=1&mime=video%2Fmp4&ns=eHi2r1NVd5M8BAjkiOX4qNkI&gir=yes&clen=107193058&dur=1748.213&lmt=1667438874069093&keepalive=yes&fexp=24001373,24007246,24277528&beids=24277528&c=WEB&txp=5535434&n=yXbkhQLqunznBw&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIga3lZpTB7f6XsGZecQcl2jObHMmGElbj2Ynjw4FH_PsACIFUyjydyoMC-cRj66EowoPtSSZ2TIrJe_DHcY9ripop-&redirect_counter=1&cm2rm=sn-8vq54voxpu-2nge7l&req_id=1e5c643ba3e2a3ee&cms_redirect=yes&cmsv=e&ipbypass=yes&mh=Vz&mm=29&mn=sn-8vq54voxpu-hm2s&ms=rdu&mt=1667618211&mv=m&mvi=1&pl=24&lsparams=ipbypass,mh,mm,mn,ms,mv,mvi,pl&lsig=AG3C_xAwRgIhAJwmorkCqr-g9RLSTk0SS5FEB89C9PyO48OmT7t8ujU...

apparently the direct link to mp4 it's very similar... there is no such option like "ratebypass=yes" but both link if i pass/share it directly to urlresolver made this same video watchable from kodi.

different methods are used to get direct links to the mp4 file?

@RNavega
Copy link
Contributor

RNavega commented Nov 5, 2022

@DjDiabolik the problem is piggybacking on a third-party service.
Thousands of people use this Kodi add-on, so this would overwhelm those services like an unintentional DDoS attack.

You can modify your own add-on code to use them, of course. I myself modified the context-menu items on mine to have the Comments button at the top.

What can be done is, like you said, finding out what trick those sites are using to get access to the media, and doing the same in Python code.

PS I think Invidious is another possible source too, try playing that restricted video using one of their nodes (https://redirect.invidious.io/)

@Doktor-X
Copy link

Doktor-X commented Nov 5, 2022

I think that yt-dlp is best and also its local solution to found audio and video links and then combine them to one file

@DjDiabolik
Copy link
Contributor

@Doktor-X my suggested workaround not need to use local storage..............

@LmarLoe
Copy link

LmarLoe commented Nov 13, 2022

I added billing to Google Cloud, linked it to the project, but to no avail. Inappropriate video still not playing
Maybe I needed to make a spending? Anyway, they suspended my card the next day. And I can't even remove it.

@RNavega
Copy link
Contributor

RNavega commented Nov 13, 2022

@LmarLoe where did you read that this would allow you to watch age-restricted videos? AFAIK YT only requires one of two things: user confirmation (with a popup dialog on the webpage), or logged-in cookies that identify your account.

@LmarLoe
Copy link

LmarLoe commented Nov 14, 2022

@RNavega here above, anxdpanic has no such problem on paid accounts

On YouTube in the browser, I had to send a photo of id to confirm my age, i.e. simply confirming or logging into the account was not enough. For some reason this does not apply to the API

@neo-neo1
Copy link

neo-neo1 commented Nov 16, 2022

Not to pile on, but I've been experiencing this same error every now and then for a long time. Just came upon another video that doesn't play due to "inappropriate for some users" error. Are logs still needed?

Thanks to all the devs involved here

@nickrbogdanov
Copy link

I think I'm running into the same bug trying to play this news documentary, which (on the official YT app / website) pops up several gratuitous warnings: https://www.youtube.com/watch?v=v4OK4zQsxc0

When I use Cast Kodi to send the URL to Kodi, Kodi displays the an alert saying "The following content may contain suicide or self-harm topics" and doesn't give me the option to play the video. I tried with Age Gate disabled + enabled, same result. The log says:

2022-11-17 19:51:30.012 T:7194    DEBUG <general>: ------ Window Init () ------
2022-11-17 19:51:39.001 T:7194    DEBUG <general>: StartScript - calling plugin YouTube('plugin://plugin.video.youtube/play/','13','?video_id=v4OK4zQsxc0&incognito=false','resume:false')
2022-11-17 19:51:39.001 T:7194    DEBUG <general>: GetLanguageInvoker - Reusing LanguageInvokerThread 17 for script /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py
2022-11-17 19:51:39.002 T:7488     INFO <general>: initializing python engine.
2022-11-17 19:51:39.002 T:7488    DEBUG <general>: CPythonInvoker(17, /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py): start processing
2022-11-17 19:51:39.002 T:7488    DEBUG <general>: CPythonInvoker(17, /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py): entering source directory /storage/.kodi/addons/plugin.video.youtube/resources/lib
2022-11-17 19:51:39.002 T:7488    DEBUG <general>: CPythonInvoker(17, /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py): instantiating addon using automatically obtained id of "plugin.video.youtube" dependent on version 3.0.0 of the xbmc.python api
2022-11-17 19:51:39.004 T:7488    DEBUG <general>: [plugin.video.youtube] Starting Kodion framework by bromix...
2022-11-17 19:51:39.004 T:7488     INFO <general>: [plugin.video.youtube] Running: YouTube (6.8.20+matrix.1) on Matrix (Kodi-19.4) with Python 3.8.11
                                                   	Path: /play/
                                                   	Params: {'video_id': 'v4OK4zQsxc0', 'incognito': 'false'}
2022-11-17 19:51:39.020 T:7488    DEBUG <general>: [plugin.video.youtube] JSONStore Load |b'/storage/.kodi/userdata/addon_data/plugin.video.youtube/access_manager.json'|
2022-11-17 19:51:39.021 T:7488    DEBUG <general>: [plugin.video.youtube] Selecting YouTube config "All"
2022-11-17 19:51:39.021 T:7488    DEBUG <general>: [plugin.video.youtube] User is not logged in
2022-11-17 19:51:39.022 T:21377   DEBUG <general>: Thread scriptobs start, auto delete: false
2022-11-17 19:51:39.222 T:7194    DEBUG <general>: ------ Window Init (DialogBusy.xml) ------
2022-11-17 19:51:39.400 T:7488    ERROR <general>: Traceback (most recent call last):
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 50, in play_video
                                                       video_streams = client.get_video_streams(context, video_id)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py", line 102, in get_video_streams
                                                       video_streams = video_info.load_stream_infos(video_id)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 547, in load_stream_infos
                                                       return self._method_get_video_info(video_id)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 874, in _method_get_video_info
                                                       raise YouTubeException(reason)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>: youtube_plugin.youtube.youtube_exceptions.YouTubeException: The following content may contain suicide or self-harm topics.
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>: [plugin.video.youtube] None
2022-11-17 19:51:39.401 T:7488    DEBUG <general>: [plugin.video.youtube] Shutdown of Kodion after |0.3983| seconds

@Doktor-X
Copy link

Doktor-X commented Nov 18, 2022

I think I'm running into the same bug trying to play this news documentary, which (on the official YT app / website) pops up several gratuitous warnings: https://www.youtube.com/watch?v=v4OK4zQsxc0

When I use Cast Kodi to send the URL to Kodi, Kodi displays the an alert saying "The following content may contain suicide or self-harm topics" and doesn't give me the option to play the video. I tried with Age Gate disabled + enabled, same result. The log says:

2022-11-17 19:51:30.012 T:7194    DEBUG <general>: ------ Window Init () ------
2022-11-17 19:51:39.001 T:7194    DEBUG <general>: StartScript - calling plugin YouTube('plugin://plugin.video.youtube/play/','13','?video_id=v4OK4zQsxc0&incognito=false','resume:false')
2022-11-17 19:51:39.001 T:7194    DEBUG <general>: GetLanguageInvoker - Reusing LanguageInvokerThread 17 for script /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py
2022-11-17 19:51:39.002 T:7488     INFO <general>: initializing python engine.
2022-11-17 19:51:39.002 T:7488    DEBUG <general>: CPythonInvoker(17, /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py): start processing
2022-11-17 19:51:39.002 T:7488    DEBUG <general>: CPythonInvoker(17, /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py): entering source directory /storage/.kodi/addons/plugin.video.youtube/resources/lib
2022-11-17 19:51:39.002 T:7488    DEBUG <general>: CPythonInvoker(17, /storage/.kodi/addons/plugin.video.youtube/resources/lib/default.py): instantiating addon using automatically obtained id of "plugin.video.youtube" dependent on version 3.0.0 of the xbmc.python api
2022-11-17 19:51:39.004 T:7488    DEBUG <general>: [plugin.video.youtube] Starting Kodion framework by bromix...
2022-11-17 19:51:39.004 T:7488     INFO <general>: [plugin.video.youtube] Running: YouTube (6.8.20+matrix.1) on Matrix (Kodi-19.4) with Python 3.8.11
                                                   	Path: /play/
                                                   	Params: {'video_id': 'v4OK4zQsxc0', 'incognito': 'false'}
2022-11-17 19:51:39.020 T:7488    DEBUG <general>: [plugin.video.youtube] JSONStore Load |b'/storage/.kodi/userdata/addon_data/plugin.video.youtube/access_manager.json'|
2022-11-17 19:51:39.021 T:7488    DEBUG <general>: [plugin.video.youtube] Selecting YouTube config "All"
2022-11-17 19:51:39.021 T:7488    DEBUG <general>: [plugin.video.youtube] User is not logged in
2022-11-17 19:51:39.022 T:21377   DEBUG <general>: Thread scriptobs start, auto delete: false
2022-11-17 19:51:39.222 T:7194    DEBUG <general>: ------ Window Init (DialogBusy.xml) ------
2022-11-17 19:51:39.400 T:7488    ERROR <general>: Traceback (most recent call last):
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 50, in play_video
                                                       video_streams = client.get_video_streams(context, video_id)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py", line 102, in get_video_streams
                                                       video_streams = video_info.load_stream_infos(video_id)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 547, in load_stream_infos
                                                       return self._method_get_video_info(video_id)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>:   File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/video_info.py", line 874, in _method_get_video_info
                                                       raise YouTubeException(reason)
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>: youtube_plugin.youtube.youtube_exceptions.YouTubeException: The following content may contain suicide or self-harm topics.
                                                   
2022-11-17 19:51:39.401 T:7488    ERROR <general>: 
2022-11-17 19:51:39.401 T:7488    ERROR <general>: [plugin.video.youtube] None
2022-11-17 19:51:39.401 T:7488    DEBUG <general>: [plugin.video.youtube] Shutdown of Kodion after |0.3983| seconds

And yet yt-dlp can detect all links up to 4k but audio and video are separated
Screenshot_2022-11-18-12-45-39-600_org yausername dvd
now if only we could somehow use yt-dlp to automatically extract and merge the best audio and video together

@DjDiabolik
Copy link
Contributor

@nickrbogdanov try to look by direct link:
Try to obtain direct link by site suggested upper here........ after obtain share this link directly to "resolverurl" or "urlresolver" and i hope you can open directly from addons whitout download.

@TechXXX
Copy link

TechXXX commented Mar 6, 2023

Same deal here, trying to play a corny erotica movie after reading a Reddit post of a user who couldn't access age restricted content ( https://www.reddit.com/r/Addons4Kodi/comments/11jlnzi/help_youtube_addon_refuses_to_play_age_restricted/ ).

https://www.youtube.com/watch?v=BTVByFr3GVU&t=1559s&ab_channel=Cin%C3%A9maZone

Have my own API keys from a verified account, plays in browser, age gate and safe search disabled.

I searched for " A Nous les lycéennes - 1975 [Film Complet] " and the first 2 give unknown error and the third result gives me the age restricted notification in the right upper corner.

Debug log, scroll towards the end for relevant entries:

kodi.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests