YouTube in 4K?

It’s something we can look in to when we get more time.

1 Like

I’ll give this a shot. Even if it doesn’t give 4K, running the Min.Bandwidth way up should help with the quality of the lower resolutions.

Thanks!

Hey Sam! I figured this was a limitation of some kind of copy protection imposed by Google. Take all the time you need. I know you’ve got a lot on your plate!

Eric

OK quick update. Changed the Min.Bitrate to 10,000,000 Bit/s (same as 10Mbit/s) and altered Max resolution as directed. Left everything else alone. Immediately got 1080p streams! Yay! So that worked. Quality is vastly improved as well. Less block noise and banding.

Next I upped the Min.Bitrate to 20,000,000 (same as 20Mbit/s) just to see if it would choke or stutter (I have 1Gbit/s Internet so 20Mbit/s shouldn’t stutter due to that being a bottleneck). Works good so far. Can’t say the quality is noticeably better than 10Mbit/s but I haven’t watched that many videos yet. Could be the limiting factor is the source material, I dunno.

Sam, as you can see above I got 1080p streams working. I know the YouTube add-on isn’t your product. However, is there a way to have OSMC automatically set InputStream Adaptive to max resolution and/or higher bitrates? I guess the ideal thing would be to ship OSMC with the YouTube add-on already installed and configured but you may not be able to do that due to license restrictions.

Can you confirm that the video you are trying to play is in fact available in 4k ? You should be able to on pc but I think you only get the option in the player if a 4k screen is detected

The problem is also that the YouTube addon itself doesn’t mention 4k anywhere just 720/1080p

Well the particular video I tested it with was the new Avengers Endgame trailer, which I oddly can’t seem to find in 4K just yet. Still looking. However I can confirm the trailer is 1080p as shown in the YouTube add-on video info. Prior to modifying the YouTube add-on settings, was being displayed in horrifically blocky 720p. My Samsung Q8 TV shows the display resolution is 4K but that’s either the Vero 4K+ or my Marantz AVR upscaling it I’m sure.

I’ll try some of the test 4K videos on YouTube in a bit. Kids are watching Christmas movies right now and aren’t in the mood for me to be fiddling with stuff LOL.

https://forum.kodi.tv/showthread.php?tid=325740

The issue is actually caused by the fact that 4K content on YouTube is encoded in VP9.
Vero 4K + supports this; but other devices don’t. The inputstream add-on currently doesn’t request VP9 streams.

You can let the maintainer’s know here that you’re interested in 4K support: Kodi Community Forum. I’ll look in to this when I get a chance.

Sam

I actually got 4K streams working by selecting “Ignore Display Resolution” in the InputStream Adaptive settings.

I now get VP9 streams, no VP9.2 (HDR) though.
This is on a Vero 4K.

3 Likes

After some juggling of settings, I’m seeing the same - 4K, but not 4K HDR.

The “Settings” section within the YouTube add-on strongly implies that HDR stuff should be available. Anyone found a way to enable it?

Sweet! Thanks, man! :slight_smile: No HDR here but UHD is a first step.

1 Like

Thanks @almightyguru this worked on my 4k+ as well. If you got HDR working please update is

Can anyone please summarize what I need to do to get 4k on YouTube?

  1. Enable MPEG-DASH
    In inputstream adaptive -> general
  2. Set min. bandwidth to 10,000,000
  3. Set max resolution general to 1080p
  4. Set max resolution secure to 1080p
  5. Enable ignore display resolution
    Is this correct? I’m only getting 1080p @ 60hz so far.
    Did I miss something?

Ok. To answer my own question, I set everything back to default, then I only did the ff:

  1. Go straight to settings -> MPEG-DASH
  2. Enable ‘Use MPEG-DASH’
  3. Enable ‘Use for videos’ under ‘Proxy is required for MPEG-DASH vods’
  4. Set the video quality to ‘2160p (4k)’ under the proxy section.
    That’s it. YouTube already works at 4k.
1 Like

For some reason these settings don’t work on my end.
I’ll keep experimenting some.

1 Like

Weird. Please let me know what settings you did when you’re successful :slight_smile:

@eagerbeaver and @Numiah, here are my settings. 4K works, but HDR doesn’t - As I understand it, that’s a problem which is not specific to YouTube, it’s an issue with VP9 playback generally. Sam said once that he would take a look at this after the v4.9 kernel was up and running. (But that was quite a long time ago).




@ angry.sardine I copied every single setting.
But for some reason it’s still not functioning correctly.
When I enable “ask for video quality”, the maximum setting still is 1080p, despite being in the 4kHDR channel to test things.
Changing settings at mpeg-dash to adaptive or 2160p don’t make any difference.
My YouTube app is up to date, however my Kodi is still at 17.6
I don’t plan on updating anytime soon because I don’t want to start over with Hyperion :grimacing:

This is likely your problem.

@Numiah you need kodi 18 and pls try auto instead of manual selection