The Robservatory

Robservations on everything…

 

Safari and the YouTube 4K video problem

When I posted my 787 takeoffs and landings video, I ran into a weird problem: When embedded here, the video would play in Safari at 4K (2160p), but when viewed on YouTube, the max resolution available was 1440p. After failing with web searches, I asked Twitter about it…

…but didn’t hear anything back. I pretty much gave up on the issue until today, when I stumbled across this article, which describes the exact problem I’m having. The summary of the article describes both the problem and the apparent cause:

What appears to be Google’s shift to the VP9 codec for delivering 4K video on the YouTube homepage is preventing Safari users from watching videos uploaded to the service since early December in full 4K resolution, but not from viewing webpage-embedded videos in the same resolution.

Bingo! Google seems to now be using the open and royalty-free VP9 codec for 4K videos viewed on its YouTube site, but reverts to the H264 codec when those same videos are embedded on other sites.

Note that this issue only affects videos uploaded after December 6, 2016:

Videos uploaded to the service prior to Dec. 6 in 4K resolution can still play back in full 4K resolution on Safari from the YouTube homepage.

I was curious about which macOS browsers this issue affects, so I thought I’d do a little experiment…

The experiment

I installed a bunch of browsers (some of which I’d never heard of before), and tested each to see which supported VP9 and which did not. The test was simple: Load my 787 video on youtube.com, and check the maximum resolution available in each browser. The results…

Obviously, one of these rows is not like the others. The bottom row contains the four browsers that failed the test: Safari, Safari Technology Preview, iCab, and OmniWeb. All four are based on WebKit, the open source browser engine. It also happens to be the only major browser engine that has not yet added support for VP9—even Microsoft’s Edge browser on Windows 10 shows the 2160p option.

Why no VP9 in Safari/WebKit?

As I understand it, there are some technical—and possibly philosophical—challenges in implementing VP9 in WebKit, at least across all of Apple’s devices. Apple uses hardware acceleration of H264 for video, and I’ve read that their chips can’t do VP9 acceleration. Apple is also part of the MPEG group pushing the High Efficiency Video Coding (H265) codec, a competing codec to VP9.

But there’s also a chance that Apple is sort of waiting to see what comes of the Alliance for Open Media (AOM), which is designing a free and open successor to VP9. Google is a member, as are Microsoft, Netflix, Amazon and just about every other major tech company except Apple. Included on the list are chip companies, which should address the issue of hardware acceleration (though not in Apple-created chips.)

If I had to bet, I’d bet that Apple would be inclined to see what the AOM comes up with before making a move. If their new codec is good enough, Apple would save a lot on royalty payments by moving away from H264/5. Sadly, I think this confused state of VP9 vs. H265 vs. future AOM codec means we’re stuck where we are for the foreseeable future: If you want to watch 4K video on youtube.com, you’ll have to do it in a browser not based on WebKit. Thankfully, there are many such browsers to choose from.

(Any video codec experts out there know this stuff better than I do? I’d love to hear your thoughts!)

5 Comments

Add a Comment
  1. Search YouTube for “4K” and click on COSTA RICA IN 4K 60fps (ULTRA HD) w/ Freefly Movi. This video plays in Safari at 4K (2160p) and so does several videos from Around The World 4K channel.

    I’m guessing the details lie in the file you’re uploading and/or how you’re uploading it (directly to YouTube or from an app).

    1. The linked article I found has the explanation; I should’ve quoted that bit: Movies uploaded before December 6th will work fine; those uploaded after that date will not.

      -rob.

  2. Does that fact that Chrome, Vivaldi et al will play back in full 4K imply that their renderings are NOT hardware accelerated? If not h/w accelerated, do you see a big difference in your CPU loads playing 4K in those browsers?

    1. Oh yes, there’s a *huge* difference in CPU hit. It drives my iMac to 200% CPU usage; Safari in H264 mode uses maybe 20%. Clearly hardware acceleration is a Good Thing. Just annoying that (a) Apple is behind (it seems, anyway, given others acceptance of VP9), and (b) that Google is forcing this issue by not proving H264 to files served directly on youtube.com – clearly they’re there, given they work when embedded.

      Sigh; codec wars suck.

      -rob.

Leave a Reply to Rob Griffiths Cancel reply

The Robservatory © 2018 • Privacy Policy Built from the Frontier theme