YouTube no longer supports 4K video playback in Safari
9to5mac.com
9to5mac.com
What's the status of hardware acceleration of next-generation video standards (h.265, VP9, something else)?
It's my understanding that after VP8 was pushed and then superseded rapidly, hardware manufacturers are now leery of implementing anything other than h.264.
And as a follow-on: what makes generic GPU hardware and software not sufficient for hardware acceleration of video decoding? What is it that makes my GPU stupendously good at pushing pixels and training neural nets and physics calculations and so many other things, but not better than my CPU at video decoding? Is there a reason h.265 and such aren't implemented in CUDA?
I don't know much about video encoding, not even enough to be dangerous, so to speak.
You're only likely to find proper hardware acceleration for the top codecs like h.264, not much else. There's going to be software acceleration for everything else. So from the MPEG[2] group, as you might expect, there's h.265. But then there's a whole new undertaking by the big guys like Netflix, Google, etc. which is called AOMedia[1]. Now they have this new codec called AV1[3] which is still in development. And it's open source and royalty free which is not usually what happens in the MPEG group because they charge royalties and have patents on the codecs/standards they have.
>what makes generic GPU hardware and software not sufficient for hardware acceleration of video decoding?
Now I'm not a video encoding/decoding expert, but just enough to be dangerous actually. What makes GPUs well suited is that they have many, many more cores so each core can handle a specific area of the video output that needs to be decoded.
It's called parallel programming. Whatever can efficiently be implemented on GPUs better than CPUs, people are doing it. This is recently being called GPGPU programming, where tasks that were thought were better done by CPU are being re-programmed for the GPU since the development and performance in GPUs have been going through the roof.
Now when it comes to the why, think of it this way. Your average complex computation is more like lifting a couple really heavy boulders. So you need a strong person to lift it. So that strong person is your CPU core, with complexity and high clock rate. But video encoding is not that complex at the pixel level. So it is more like picking lots (thousands) of tennis balls. GPUs are like having a bunch of kids (current gen GPUs have ~2000 cores even at the mid-range) who are no where as strong as the strong CPU guy, but you can guess who will get the task done faster.
[1]:http://aomedia.org/about-us/
[2]:https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group
Intel, Nvidia, AMD, and ARM all support VP9 acceleration:
https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video
http://www.tomshardware.com/reviews/intel-7th-gen-core-kaby-...
https://en.wikipedia.org/wiki/Nvidia_PureVideo
https://en.wikipedia.org/wiki/Unified_Video_Decoder
http://www.anandtech.com/show/10428/arm-announces-mali-egil-...
https://en.wikipedia.org/wiki/VP9#Hardware_encoding.2Fdecodi...
LAV Filters (an Open Source implementation of DirectShow/DXVA filters) VP9 support works with Maxwell cards for sure, I have a 780ti somewhere I can check Kepler also, but IIRC it should work.
That said this would work for many video players that use DXVA or have support for external DS filters e.g. VLC/MPC-HC or proprietary players like Splash, but it won't work in a browser. Chrome for example doesn't allow for external filters iirc so you'll see a pretty big CPU jump. For some reason it seems fine on VP9 1080p videos on a Maxwell card CPU is 2-3% but at 4K it jumps to 70-80% I have a feeling that since Maxwell has partial support in the PV block for HEVC and VP9 they might be able to decode 1080p with it and then do full CPU decoding for 4K, I wouldn't expect CPU decoding for 1080p to be so resource efficient otherwise.
This one can work with either a dedicated media player or with Edge, Chrome does it's own thing and I'm not entirely sure what they do and I have no clue about Safari/Opera/Firefox so if some one wants to fill in about them that would be nifty.
Whilst technically DXVA is a software decoder https://en.wikipedia.org/wiki/DirectX_Video_Acceleration It does offload the heavy lifting to the GPU via shaders, so can still some what classify it as "hardware decoding" since softare decoder/encoders are usually defined as CPU only.
I've made a post about how VP9 is offloaded to GPU in this thread, it's done via DXVA/MF on Windows.
Instead, I installed mpv [0], and since it embeds youtube-dl [1] you can play any video with the native UI by running:
mpv "youtube_url"
[0] https://mpv.io/mpv took a little bit of getting used to since it doesn't offer a lot of useful stuff out of the box (automatically queuing files, subtitle downloads, etc) but since you can write quite powerful scripts for it that didn't remain a problem for long.
[1] https://blog.malwarebytes.com/puppum/2016/09/pup-friday-mpla...
MPlayerX was once upon a time also that, but its maintenance went vaporware a few years back, and the bundled crap finally killed it. So for a while now, I've been looking for a good player. Seems Iina is that player.
This lets you watch every single YT clip using player of your choosing. Result is smooth video on 10 year old laptops(1.8GHz Core2) when Flash/browser buildin codecs are barely able to play 480p.
its a mess, but ~works :)
$ youtube-dl --list-formats https://www.youtube.com/watch?v=DeJLzyxZqbk | grep '[0-9]x[0-9]'
278 webm 256x144 DASH video 93k , webm container, vp9, 24fps, video only, 1.09MiB
242 webm 426x240 DASH video 110k , vp9, 24fps, video only, 1.00MiB
160 mp4 256x144 DASH video 113k , avc1.4d400c, 24fps, video only, 1.41MiB
243 webm 640x360 DASH video 196k , vp9, 24fps, video only, 1.83MiB
133 mp4 426x240 DASH video 247k , avc1.4d4015, 24fps, video only, 3.08MiB
134 mp4 640x360 DASH video 263k , avc1.4d401e, 24fps, video only, 2.95MiB
244 webm 854x480 DASH video 322k , vp9, 24fps, video only, 3.11MiB
135 mp4 854x480 DASH video 554k , avc1.4d401e, 24fps, video only, 6.30MiB
247 webm 1280x720 DASH video 714k , vp9, 24fps, video only, 7.48MiB
136 mp4 1280x720 DASH video 1127k , avc1.4d401f, 24fps, video only, 12.92MiB
248 webm 1920x1080 DASH video 1579k , vp9, 24fps, video only, 17.86MiB
137 mp4 1920x1080 DASH video 2304k , avc1.640028, 24fps, video only, 27.09MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
43 webm 640x360 medium , vp8.0, vorbis@128k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)Edit: As SG- pointed out, I also cannot read and Youtube is processing 4K h264, but not offering it on the main site. So it's puzzling why they're doing this. Bandwidth is a possibility, but you'd think it'd be consistently applied.
* You can test this using Chrome + h264ify. Which I use because the battery life when watching VP9 is truly horrific, and I don't care how much Google saves on bandwidth by pulling this stunt.
Out of curiosity, why was this article safari framed when it affects all browsers that want to use h264 4k including chrome and opera? Is there some way that this is actually a safari-centric change?
So it looks like they're encoding h264 in 4K, just not if you're on the actual Youtube site.
D:\_learning>youtube-dl.exe -F https://www.youtube.com/watch?v=4Twcx4QozRc
[youtube] 4Twcx4QozRc: Downloading webpage
[youtube] 4Twcx4QozRc: Downloading video info webpage
[youtube] 4Twcx4QozRc: Extracting video information
[youtube] 4Twcx4QozRc: Downloading MPD manifest
[info] Available formats for 4Twcx4QozRc:
format code extension resolution note
249 webm audio only DASH audio 53k , opus @ 50k (48000Hz), 811.34KiB
250 webm audio only DASH audio 85k , opus @ 70k (48000Hz), 1.24MiB
140 m4a audio only DASH audio 95k , m4a_dash container, mp4a.40.2@128k (44100Hz), 1.47MiB
171 webm audio only DASH audio 104k , vorbis@128k (44100Hz), 1.44MiB
251 webm audio only DASH audio 127k , opus @160k (48000Hz), 1.86MiB
278 webm 256x144 DASH video 114k , webm container, vp9, 24fps, video only, 1.10MiB
160 mp4 256x144 DASH video 114k , avc1.4d400c, 24fps, video only, 1.67MiB
242 webm 426x240 DASH video 143k , vp9, 24fps, video only, 1.27MiB
243 webm 640x360 DASH video 248k , vp9, 24fps, video only, 2.22MiB
133 mp4 426x240 DASH video 260k , avc1.4d4015, 24fps, video only, 3.71MiB
134 mp4 640x360 DASH video 268k , avc1.4d401e, 24fps, video only, 3.23MiB
244 webm 854x480 DASH video 380k , vp9, 24fps, video only, 3.48MiB
135 mp4 854x480 DASH video 569k , avc1.4d401e, 24fps, video only, 6.62MiB
247 webm 1280x720 DASH video 761k , vp9, 24fps, video only, 6.77MiB
136 mp4 1280x720 DASH video 1101k , avc1.4d401f, 24fps, video only, 12.63MiB
248 webm 1920x1080 DASH video 1726k , vp9, 24fps, video only, 13.09MiB
137 mp4 1920x1080 DASH video 2324k , avc1.640028, 24fps, video only, 24.90MiB
271 webm 2560x1440 DASH video 4744k , vp9, 24fps, video only, 38.59MiB
264 mp4 2560x1440 DASH video 6415k , avc1.640032, 24fps, video only, 62.11MiB
266 mp4 3840x2160 DASH video 11632k , avc1.640033, 24fps, video only, 152.17MiB
313 webm 3840x2160 DASH video 16250k , vp9, 24fps, video only, 175.23MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
so 4K is indeed just hidden in the YT player, but present in the manifest
In different eras and with different company, this would be called monopoly.
b) The only affected browser is Safari. Edge and Firefox remain unaffected.
c) How many people actually watch 4K videos, and how many videos are 4K?
So let's not go overboard on the conspiracy theories. For all we know, it could be a bug.
Almost all modern the GPUs and processors have hardware decoding for VP9
Your argument is that Google is evil for pushing a codec that's patent-free and better as a codec? Also, as others have stated, VP9 has wide hardware acceleration support (and will have wider support in the future)?
It saves an incredible amount of battery life over Chrome (which makes me that much more weary of Electron apps eating up battery and memory at idle). Is there any specific architecture decision by Safari that enables those battery savings?
http://www.cvedetails.com/product/2935/Apple-Safari.html?ven...
http://www.cvedetails.com/product/15031/Google-Chrome.html?v...
I'm only guessing that as Firefox goes multi-process for security reasons the same thing will happen. Their CPU usage will go up because of the overhead of cross process communication but their code execution bug percentage will go down
One example of this is where Safari will suspend tabs (as in slow them down or freeze them while keeping them in memory) you haven't used in 15+ minutes that aren't playing music for anything. Effectively, this means that Safari's total power impact is only that of the 2-4 tabs you're currently actively using instead of how ever many you actually have open. It's a bit nicer than something like The Great Suspender though, since it doesn't just trash the loaded pages and force you to reload upon visiting said tabs.
If you're using an adblocker based on WebKit Content Blockers, that can have an impact too. They're much more efficient than even uBlock and add almost no additional CPU or RAM usage to web browsing, meaning you fully reap all the savings of blocking ads and egregious JS.
There aren't really any good WebKit-based options on Windows, though. IIRC Midori runs on Windows but is GTK based and feels out of place.
See https://trac.webkit.org/wiki/WebKit2#ProcessArchitecture
Where as Chrome that's not the case, all OS/Driver level graphics happen in the GPU process. That means all data has to be shuttled from the process that wants to display the data to the GPU process. Even video for example gets decoded in a secure process (because there might be exploitable bugs in the codecs) then that data has to be shuttled to the GPU process so it can be composited with the page. The directives of compositing happen in the render process (the webpage) but eventually have to translated to graphics commands that happen in the GPU process.
None of this is true in WebKit2 AFAIK and is one of the many reasons it has so many move code exploit bugs (15x actually for 2016).
I use an iMac, so battery life is not a concern. Even otherwise, I'd take video quality over battery life.
Unless Google ever uses one of your patents, and you have to sue Google over that.
VP8 and VP9 come with a no-litigation clause that basically requires you to share all your patents with Google if you use VP8 and VP9 – which is a shame.
Do you have a link to the license which says you must share all your patents with Google?
That’s the usual wording of these clauses, and the problem.
You only lose the right to use WebM parents if you file litigation against any user of WebM (not just Google) over any implementation of WebM. You can sue Google about anything else and not suffer WebM license consequences.
You're probably thinking of Facebook's open source patent rider. https://github.com/facebook/react/blob/master/PATENTS
And yes, Facebook and Tesla’s patent licenses are completely ridiculous.
h264 uses a retarded amount of bandwidth compared to VP9, so I can't blame Google for not wanting to implement it.
Google is still providing a choice here, except for 4K where it costs them twice as much. Apple on the other hand has no excuse for not implementing both. There is also a free low-power hardware implementation of VP9 which Apple (who makes their own SoC) could choose to use but hasn't.
They don't make their own SoC for their laptop and desktop machines, which is who this primarily affects. 4K on iPhones doesn't matter since they only have 2560x1440 resolution.
Most modern computers have hardware ASIC's capable of decoding h.264. It is a total waste to not use it.
As one could say that 4K video and network speed issues don't go hand in hand.