Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aleksid1

macrumors member
Nov 14, 2017
93
47
I'm macOS developer.

QuickTime can't play AV1 videos in .webm format.

I didn't find hardware acceleration in Chrome (M1 version) for .webm videos.
When I played a sample video AV1 1080p in .webm CPU loading was 120% and for H.264 video Chrome shown only 9%.

In my app results were the same. I couldn't utilize VideoToolBox hardware decoder for AV1 videos.
 

Gnattu

macrumors 65816
Sep 18, 2020
1,020
1,396
I'm macOS developer.

QuickTime can't play AV1 videos in .webm format.

I didn't find hardware acceleration in Chrome (M1 version) for .webm videos.
When I played a sample video AV1 1080p in .webm CPU loading was 120% and for H.264 video Chrome shown only 9%.

In my app results were the same. I couldn't utilize VideoToolBox hardware decoder for AV1 videos.
AV1 is not even part of CoreMedia's kCMVideoCodecType.

But VP9 was not as well until iOS 14, that's what I say it is not 'verifiable'. We may or may not have the hardware capability, but we cannot check that out until Apple gives us a way to check that.

All Video Codec Constants currently supported can be checked on Apple Developer Website
 

Aleksid1

macrumors member
Nov 14, 2017
93
47
Funny fact - Apple is a member of Alliance for Open Media who designed AV1 video codec. And this member doesn't support yet AV1 even in new Macs nor new macOS.

Apple is also licensor of commercial H.264 codec which is well supported...
 

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,309
AV1 is not even part of CoreMedia's kCMVideoCodecType.

But VP9 was not as well until iOS 14, that's what I say it is not 'verifiable'. We may or may not have the hardware capability, but we cannot check that out until Apple gives us a way to check that.

All Video Codec Constants currently supported can be checked on Apple Developer Website

VideoToolbox lets you enumerate the property bags for all the codecs it supports. There is a flag for if it uses HW vs SW to differentiate the H.264 and H.265 SW vs HW codecs. VP9 only has the single entry I’ve seen, and doesn’t set the HW property on it. If there was HW support, I would have expected two entries (one SW, one HW).

Since VP9 is Google’s baby, I’m not terribly surprised Apple hasn’t created a hardware codec for it. Apple’s more likely to focus more on AV1 and use VP9 as a way to bridge the gap in the short term, until it is ready.
 

Gnattu

macrumors 65816
Sep 18, 2020
1,020
1,396
VideoToolbox lets you enumerate the property bags for all the codecs it supports. There is a flag for if it uses HW vs SW to differentiate the H.264 and H.265 SW vs HW codecs. VP9 only has the single entry I’ve seen, and doesn’t set the HW property on it. If there was HW support, I would have expected two entries (one SW, one HW).

Since VP9 is Google’s baby, I’m not terribly surprised Apple hasn’t created a hardware codec for it. Apple’s more likely to focus more on AV1 and use VP9 as a way to bridge the gap in the short term, until it is ready.
But you cannot explain the extremely low CPU usage (and power usage )for VP9 playback.
Is M1's CPU part that good to playback 4K Video with software decoder only consuming hundreds milliwatts power?

Another fun fact is that, Google's Youtube App is granted a special title to use an "alternate" decoder:
com.apple.developer.coremedia.allow-alternate-video-decoder-selection

This entitlement is undocumented(at least I cannot find it on developer website), but without such entitlement, the attempt to decode a VP9 video using VideoToolBox will fail on iOS as VTIsHardwareDecodeSupported(kCMVideoCodecTypeVP9) is returning false, and VTDecompressionSessionCreate() will fail with error -12906 which means "decoder not found".

However I profiled the CPU usage for Youtube on iOS and it was very low, and there is VT-related processes being created and running, so on iOS, you have to be granted by Apple to use that "alternate decoder".
 
Last edited:

Krevnik

macrumors 601
Sep 8, 2003
4,100
1,309
This entitlement is undocumented(at least I cannot find it on developer website), but without such entitlement, the attempt to decode a VP9 video using VideoToolBox will fail on iOS as VTIsHardwareDecodeSupported(kCMVideoCodecTypeVP9) is returning false, and VTDecompressionSessionCreate() will fail with error -12906 which means "decoder not found".

Well, that’s disappointing, but not entirely unheard of for Apple. More surprised they let Google use the entitlement at all if it’s not public (yet?). But now I wonder why it’s behind an entitlement at all. It suggests that Apple either doesn’t feel it is ready for wide use, or doesn’t want to support it outside of very specific scenarios as a way to discourage wider adoption of the codec.

It also makes me wonder if Apple’s using some off-the-shelf decoder blocks that happened to include VP9 dating back to the A10 (if not earlier), but more as an academic question.

EDIT: I can get VTIsHardwareDecodeSupported() to return true if I call VTRegisterSupplementalVideoDecoderIfAvailable() first. Although now VTDecompressionSessionCreate() returns -8971 which is codecExtensionNotFoundErr, suggesting I’ve not configured it properly, or there’s something else involved here too.

That said, I don’t have much experience with VT, I tend to sit at the AVFoundation layer and let it handle what I need.

EDIT 2: It does look like this error is returned in cases where the extensions dictionary is missing an entry that’s expected. It’s getting late, so I’d have to poke around a bit more in the morning.
 
Last edited:
  • Like
Reactions: juzbox

Aleksid1

macrumors member
Nov 14, 2017
93
47
My M1 Air:

Stream1_AV1_4K_8.5mbps.webm
Chrome (native M1 code) shows 140-150%
VLC (Rosetta 2) shows 170-190%
QuickTime can't play this video

I tested H.265 4K video with VLC (Rosetta 2) and it shows 22%.

So you can see that AV1 playback doesn't have hardware acceleration in M1.
 
  • Like
Reactions: Karut and satcomer

Vlad Koon

macrumors member
Jan 10, 2021
32
4
Someone please check the smoothness of 4K60P video playback on YouTube in Mac mini M1. First of all, I am interested in the smoothness of decoding such videos in Chrome.
I have an Intel NUC Hades Canyon (HVK). I open a 4K 60fps video in Chrome and see a bunch of dropped frames. The playback does not go as smoothly as possible :(

rIU6WsN_2.jpg


rIU6WsN.jpg


Link to video for the test:
Code:
https://www.youtube.com/watch?v=-RsmsV2BYPY


P. S. I am already thinking about buying a new Mac mini on the M1 chip ?
 
Last edited:

matrix07

macrumors G3
Jun 24, 2010
8,226
4,891
Someone please check the smoothness of 4K60P video playback on YouTube in Mac mini M1. First of all, I am interested in the smoothness of decoding such videos in Chrome.
I have an Intel NUC Hades Canyon (HVK). I open a 4K 60fps video in Chrome and see a bunch of dropped frames. The playback does not go as smoothly as possible :(

View attachment 1710641

View attachment 1710642

Link to video for the test:
Code:
https://www.youtube.com/watch?v=-RsmsV2BYPY


P. S. I am already thinking about buying a new Mac mini on the M1 chip ?
No dropped frame here on base M1 MBA but it could be because my connection speed is like 7X than yours. (this is on Safari however)
youtube.jpg
 
  • Like
Reactions: Vlad Koon

kode54

macrumors newbie
Jan 15, 2014
24
16
The latest stable Xcode does define kCMVideoCodecType_VP9, but no AV-1 yet. Guess we're halfway there.

(I also noticed that Safari decodes VP9 videos in hardware, nice.)
 
  • Like
Reactions: matrix07

Chancha

macrumors 68020
Mar 19, 2014
2,095
1,896
Can confirm that a certain 8k YouTube video would load AV1 when 8k is played, but fallback to VP9 when sub-4k is selected, and this is only in Chrome. (This is not always the case, depending on how the video is uploaded / processed)

Judging by the relative CPU usage playing back 4k vs 8k, it seems VP9 is getting hardware decoding where AV1 is software.

As a reference in Safari, AV1 does not seem to be accessible by any means and thus the same video would have the 8k option missing. When this being possible later I am interested to see if performance will increase, since on my M1 Air, 8k60p AV1 via Chrome drops about 30-40% of frames, whereas 8k30p plays fine. For a 8k60p VP9 video, frame drops still happen but visibly less severe (somewhere 10-15%).
 
Last edited:
  • Love
Reactions: Vlad Koon

Chancha

macrumors 68020
Mar 19, 2014
2,095
1,896
Have you tried version 87 optimized for the M1 chip?
If you are concerned about 4k60p on an M1 Mac then you don't need to worry. It seems to be regardless of codec and browser, the M1 CPU bottleneck is between 8k30p and 8k60p, it has a lot of headroom to handle 4k60p even when HDR is involved.

By the way since you seem to be using k-pop videos to test, the KBS Kpop channel with its k-choreo videos at 8k60p are the ones that the M1 struggles with. The latest 2 IU fancam videos are interesting in that one is in VP9 while the other is AV1. "Lilac" in VP9 drops a bit, while "Epilogue" in AV1 drops like a b***h, on my M1 Air via Chrome.
 
  • Like
Reactions: Vlad Koon

Vlad Koon

macrumors member
Jan 10, 2021
32
4
If you are concerned about 4k60p on an M1 Mac then you don't need to worry. It seems to be regardless of codec and browser, the M1 CPU bottleneck is between 8k30p and 8k60p, it has a lot of headroom to handle 4k60p even when HDR is involved.

By the way since you seem to be using k-pop videos to test, the KBS Kpop channel with its k-choreo videos at 8k60p are the ones that the M1 struggles with. The latest 2 IU fancam videos are interesting in that one is in VP9 while the other is AV1. "Lilac" in VP9 drops a bit, while "Epilogue" in AV1 drops like a b***h, on my M1 Air via Chrome.
Thank you very much! Could you check it out in Firefox as well? It works much better on my computer than Chrome :)
 

nquinn

macrumors 6502a
Jun 25, 2020
829
618
Still no AV1 or VP9 decode support in the new M1 Pro / M1 Max chips I assume? (based on Apple's listed specs and the fact that they are based on the old A14 cores?)
 

benyben123

macrumors regular
Sep 22, 2013
172
26
I thought VP9 decoding was added on Big Sur. Actually, I might be wrong. Maybe it was just on the Apple TV update?

Honestly if there's no VP9 support yet - this is absurd!
 

nquinn

macrumors 6502a
Jun 25, 2020
829
618
I thought VP9 decoding was added on Big Sur. Actually, I might be wrong. Maybe it was just on the Apple TV update?

Honestly if there's no VP9 support yet - this is absurd!

Ya - since these are laptops and not phones the bandwidth doesn't matter that much to me, but I HATE hot running laptops or fans that spin up.

Additionally, for some large videos youtube will ONLY offer vp9 support with no ability to fallback to h.264 (where a browser plugin could hack it like h.264ify). This is all probably because Apple has some ownership in HEVC.

So so so annoying.
 

white7561

macrumors 6502a
Jun 28, 2016
934
383
World
Have you guys seen the power usage on VP9 and AV1 decoding on M1 Macs? It's pretty good TBH


As you can see, using Safari and Chrome. The 4K VP9 SDR video uses less power using HW decoding than SW . which means they do have some sort of HW decoder for VP9. The article is quite good and i recommend the Part 2 which test the local too..

 
  • Like
Reactions: altaic

Pressure

macrumors 603
May 30, 2006
5,049
1,387
Denmark
Still no AV1 or VP9 decode support in the new M1 Pro / M1 Max chips I assume? (based on Apple's listed specs and the fact that they are based on the old A14 cores?)
The media engine have nothing to do with the processor cores though ??‍♂️
 

nquinn

macrumors 6502a
Jun 25, 2020
829
618
Super interesting article. According to article 2 AV1 performs even better than VP9.

What's confusing to me though is that we have roughly a 10w TDP M1 chip, let's say half used for gpu, so call it a bit less than 5w for cpu.

With 9% perf utilization and 20% efficiency utilization the total power consumption below (efficiency+performance+gpu) we're seeing only around 70-90mw on the cpu, and under 200mw total.

That's only 4% of 5w TDP!
 

Gelam

macrumors regular
Aug 31, 2021
109
33
Now that M2 is coming, will you guys be testing if M2 has AV1 hardware decoder?
Has there been any speculation if apple added AV1 decoder to M2 yet?
 
  • Like
Reactions: Populus
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.