JohnCoates / Aerial

Apple TV Aerial Screensaver for Mac
MIT License
20.77k stars 1.05k forks source link

Feature: 4K Video Support #378

Closed peterrussell closed 5 years ago

peterrussell commented 7 years ago

Looks like we'll finally get high resolution videos as part of the Apple TV 4K. https://9to5mac.com/2017/09/11/tvos-11-4k-apple-tv-screensaver/

Can't wait to get them on my iMac

chipped commented 6 years ago

@mattvlasach Does it stutter?

chipped commented 6 years ago

@mattvlasach I checked the screensaver and it is HEVC Main 10 profile, your Skylake CPU can only hardware accelerate up to Main 8 profile. That's why your CPU usage is high and it's probably stuttering.

There you go, stuttering mystery solved. Just have to do a bit of research :)

Screenshot attached.

screen shot 2018-01-07 at 1 36 17 pm

Just incase you missed my post before referencing the Hardware Acceleration capabilities, I'll post it here again.

“macOS High Sierra adds support for High Efficiency Video Coding (HEVC), with hardware acceleration where available, as well as support for High Efficiency Image File Format (HEIF). Macs with the Intel Kaby Lake processor offer hardware support for Main 10 profile 10-bit hardware decoding, those with the Intel Skylake processor support Main profile 8-bit hardware decoding, and those with AMD Radeon 400 series graphics also support full HEVC decoding.[5] In addition, audio codecs FLAC and Opus will also be supported, but not in iTunes.[11][12]”

https://en.wikipedia.org/wiki/MacOS_High_Sierra

Changes > System > Media

mattvlasach commented 6 years ago

@chipped thanks for all of the info. I haven't had a chance to try your previous recommendation involving Auto Graphics Switching. That said, given your latest post, I assume that it will not make any improvement in my case due to lack of hardware support for Main 10?

I'm not sure if this even makes any sense, but is transcoding to Main 8 possible?

chipped commented 6 years ago

@mattvlasach You wouldn't have Automated Graphics Switching as you only have one GPU.

You can try downloads this 4K clip which is 8 bit (Main 8) and play it. I tried it using my Intel GPU and it was super smooth and low CPU usage. Hardware Acceleration working well.

Link http://4ksamples.com/4k-uhd-fireworks-sample/

jyavenard commented 6 years ago

The AMD card isn't used for decoding yet despite what the wikipedia entry state (since anyone can modify it, it's not a hard thing to do)

For the the 4K videos forcing the AMD cards with gfxStatus gives identical results above as the default, that is: 1- 10 bits videos above aren't played 2- 8 bits 4K ones shows very high CPU usage

Using a 2017 MBP with 7th gen intel however works as expected.

If Apple didn't automatically switch the GPU to one that can play the content, I would lodge a bug with Apple. There should never be any needs to force which GPU is in use.

chipped commented 6 years ago

@jyavenard

  1. Did you try 10 bit SDR or HDR?

  2. Did you try the 8 bit one I linked above? Maybe your sample is incompatible. Download MediaInfo and provide a screenshot.

  3. Where is your evidence that Apple is not using AMD card for decoding? If you watch my screen recording you can clearly see the AMD GPU processor is working when I play the 4K SDR screensaver with Automated Graphics Switching turned off.

  4. gfxCardStatus simply toggles the Automated Graphics Switching in System Preferences. You don't actually need it to force the AMD GPU. I use it because its nice and easy and displays useful info.

jyavenard commented 6 years ago

All my comments are related to the issue at play. That is this bug and the videos provided by https://sylvan.apple.com/Aerials/2x/entries.json (listed in https://github.com/JohnCoates/Aerial/issues/378#issuecomment-337645247) I don't care about other videos you may find elsewhere. It's about the videos HERE that don't play properly.

In your screen recording, we can clearly see the CPU increasing and staying steady the moment you start playback. 25%+ if the GPU was in use isn't normal, it should be around 5%.

3- talking at WWDC with the engineers involved.

I've asked my contacts at AMD about the state of HEVC playback and if it has dedicated decoding circuits, or if it's like VP9: they use an OpenCL decoder (so it's accelerated not fully decoded). A clear issue with their VP9 HW decoder, is that the power usage is fairly high (above 30W) which makes it mostly unsuitable on MBP. The fans start spinning at a fairly high rate making the MBP very loud. On Desktop it doesn't matter, on laptop that's not acceptable even if the capabilities are there.

  1. You certainly need to make the switch manually, otherwise your entire earlier comment is irrelevant.
chipped commented 6 years ago

@jyavenard The CPU is at 25% because of the screen recording. Usually it’s around 15%.

The videos do play properly, the SDR videos play fine. You can see that in my screen recording.

I solved your “stuttering issue”, which was really that you just didn’t know you had to use the AMD GPU to fix the stutter.

HDR is not supported by QuickTime so I can’t test it.

jyavenard commented 6 years ago

My stuttering issue? When did I ever state I had a stuttering issue?

You solved nothing, nor should you assume what a person knows.

Forcing AMD serves no purpose. You keep creating strawman arguments by "solving" issues you invented and that people do not have in the first place.

People with 13" MBP don't care about AMD. If they have a MBP with a skylake they can't play some content.

Anyhow, I'm only restating what I first posted.

chipped commented 6 years ago

@jyavenard

My stuttering issue? When did I ever state I had a stuttering issue?

My mistake, that wasn't you.

You solved nothing, nor should you assume what a person knows.

I proved the below statement of yours to be incorrect.

High Sierra for now only supports HEVC via Intel. The MBP 2016 skylake doesn't do HEVC HDR, only kabylake does (found in 2017 models)

Forcing AMD serves no purpose. You keep creating strawman arguments by "solving" issues you invented and that people do not have in the first place.

Sure it serves a purpose, it eliminates the stutter. I thought we established that already???

People with 13" MBP don't care about AMD. If they have a MBP with a skylake they can't play some content.

No, but we do know that it reliably play 8 bit colour depth properly.

Anyhow, I'm only restating what I first posted.

You're argument has now changed, whether you like it or not I helped you and hopefully everyone else. Now I think I may have an idea which I will post next.

chipped commented 6 years ago

When the links were intercepted what was the Apple TV 4K plugged into?

My Apple TV 4K is plugged into a TV which only supports 4K@60Hz 8-bit.

I wonder if mine is pulling down 8 bit screen savers instead of the 10 bit ones that are linked above?

That would make it work a lot better with a larger variety of machines.

jyavenard commented 6 years ago

Sure it serves a purpose, it eliminates the stutter. I thought we established that already???

no it doesn't... and you haven't proven anything.

Once again: https://sylvan.apple.com/Aerials/2x/Videos/LA_A006_C008_4K_SDR_HEVC.mov plays exactly the same weither you force AMD graphic or not: 108% CPU by VTDecpderXPCService (not QT) That's on top of the range MBP late 2016. While titled SDR, it's still a 10 bits video... Having an AMD doesn't help. https://sylvan.apple.com/Aerials/2x/Videos/LA_A006_C008_4K_HDR_HEVC.mov won't play at all (it's DolbyVision)

The higher end MBP version will play them without stuttering, the lower end won't.

And yes, I have access to all types of MBP, so I can actually verify what I'm describing.

I'm starting to guess that you don't even own that machine, and making stuff as you go, trolling out of your a... I re-iterate what I posted there: https://github.com/JohnCoates/Aerial/issues/378#issuecomment-352922407 "High Sierra for now only supports HEVC via Intel. The MBP 2016 skylake doesn't do HEVC HDR, only kabylake does (found in 2017 models)"

alistairmcmillan commented 6 years ago

This argument has been going on for four days now. That's enough. This isn't a discussion forum.

glouel commented 5 years ago

Closing this as implemented in 1.4