HDR 4K video support - macOS vs Windows

Discussion in 'macOS Mojave (10.14)' started by CreeptoLoser, Aug 4, 2018.

  1. CreeptoLoser macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #1
    Hi

    This post is to inform users about HDR 4K video support using HEVC decoding in macOS.

    Hardware support

    Currently macOS supports software decoding on Macs with 6th gen Skylake processors, and hardware decoding on Macs with 7th gen Kabylake processors and above.

    Macs with Skylake processors are able to play 4K videos encoded with the Rec 709 color profile, but are not capable of smooth playback of videos using the HDR standard Rec 2020 color profile.

    Decoding on GPU is not currently fully supported on any Mac, but the graphics card does help with scaling.

    Windows does support HEVC decoding on GPU for Nvidia and AMD cards. However, Nvidia only outputs 8 bit video signals on GeForce cards. AMD supports 10 bit on all Radeon Polaris and Vega cards.

    macOS vs Windows support

    Under macOS High Sierra and above, no special settings need to be applied. HDR videos will automatically display the content correctly.

    Macs ship with screens supporting the P3 color profile. Any HDR videos using a wider gamut than P3 will have their color space squeezed down. This isn’t an issue in most cases. Videos will still look great.

    Under Windows, users must enable ‘HDR mode’ in the control panel in order to display the content correctly. Without HDR mode enabled, the video content will appear burnt out and the colors will be oversaturated.

    If you enable ‘HDR mode’ the Windows desktop environment will appear washed out. This mode is only suitable for HDR video content. Currently, Windows can’t automatically enable HDR mode solely when videos play.

    Streaming video support

    Neither operating system currently support streaming HDR content from popular video sources.

    Under macOS, HDR videos streamed from Netflix or Prime will be squeezed into the P3 color profile. This isn’t an issue unless the content uses an extremely wide gamut.

    Under Windows with HDR mode on, HDR videos streamed from Netflix or Prime night attempt re-enable HDR mode and freeze. Users will need to disable HDR mode. Videos will then stream correctly but use Rec 709.

    Currently iTunes only streams HDR content to Apple TV, so neither macOS or Windows can playback HDR content.
     
  2. EugW, Aug 7, 2018
    Last edited: Aug 7, 2018

    EugW macrumors 603

    EugW

    Joined:
    Jun 18, 2017
    #2
    Not quite correct. Hardware GPU based decoding of 4K HDR is fully supported on Kaby Lake or later, but this is on the Intel iGPU. Not sure about the iMac Pro but I might guess it works on Vega there since it doesn’t have an Intel iGPU.

    The biggest difference for streaming services is that Windows supports 4K DRM but macOS does not. You currently can’t play 4K iTunes, 4K Netflix, or 4K Amazon Prime etc. on a Mac period, regardless if it is HDR or not. However, this could change with an update for macOS Mojave.
     
  3. CreeptoLoser thread starter macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #3
    You've repeated what I have said. I didn't say it was on the discreet GPU. I said there is no discreet GPU decode at all in macOS.
     
  4. EugW macrumors 603

    EugW

    Joined:
    Jun 18, 2017
    #4
    No, you said there is no GPU decoding. That is not correct. You did not specify discreet or not so it can be a bit confusing to some.
     
  5. h9826790, Aug 7, 2018
    Last edited: Aug 7, 2018

    h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #5
    The Vega on iMac Pro can actually do the hardware decoding (and obviously it's a dGPU).

    Also, it's confirmed that the RX580 (the same GPU as in the Apple eGPU developer kit) also able to perform HEVC hardware decoding in the current 10.14 beta. I have this GPU in my Mac Pro now. I have done the test by myself (as per the following screenshot). 4K HDR HEVC BT.2020 video can be play back smoothly in QuickTime Player on my Samsung CHG 90 with just the RX580.
    HEVC 10bit HDR.jpg

    I tried to show you the required info in a single unmodded screenshot (I only remove the serial numbers).

    The video is the Sony_4K_HDR_Camp.mp4, it's widely available on the internet. Clip info as per Mediainfo shows.

    CPU is very low workload (but QuickTime is working). The CPU is W3690 (as per my signature), and definitely not capable to doing any HEVC 10 bit high bitrate decoding in both software and hardware method.

    GPU is the Apple recommended (for Mac Pro 5,1), Sapphire PULSE RX580 8GB. Which has reasonable workload when decoding the video. And system info confirmed that was the only GPU installed, and displaying 30-bit colour.

    iStat showed both the CPU and GPU usage, plus the monitor was working at around 60 FPS (because the video was playing at smooth 60FPS). If the video was not playing, it will be like this (2.2 FPS in this case). Also, no QuickTime shows in the CPU process because no demand from it.
    Screenshot 2018-08-08 at 2.05.08 AM.jpg

    Or if the playback is not smooth, then it will shows the playing frame rate. I use IINA to play the same clip with software decoding. CPU was stressed to 1000%, only 10FPS (The colour seems over saturated in IINA as well)
    Screenshot 2018-08-08 at 2.19.20 AM.jpg

    And if I was playing around the mouse pointer etc to achieve higher FPS, then it will easily jump to 144FPS because CHG 90 is a 144Hz monitor.
    Screenshot 2018-08-08 at 2.10.10 AM.jpg

    Anyway, I think this is good enough to show you that MacOS can play HEVC 10bit HDR BT.2020 smoothly with dGPU hardware decode. And this is on a 9 years old Mac Pro without Skylake (or newer) CPU installed.
     
  6. CreeptoLoser thread starter macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #6
    Hi,

    Thanks for testing.

    It seems the iMac Pro was given GPU decoding because it is a pro machine but has a Skylake CPU, therefore the graphics drivers are better.

    On MacBook Pro's with Polaris graphics there is no decode on GPU so if RX580 has it then that's neat.

    I don't have an RX580 or Vega based system. Can you please try any of the following videos that I have confirmed to be using Rec 2020. These do not play well at all on a 2016 MacBook Pro with Radeon graphics.

    They are available at 4kmedia.org:

    Sony New York Fashion HDR

    Sony Whale Tonga HDR

    Sony Swordsmith HDR

    Sony Camping in Nature HDR available on that site plays perfectly on the 2016 MacBook Pro with Radeon graphics because it is actually a Rec 709 file that has been wrongly labelled. Unless you have a Rec 2020 version from another site.
     
  7. h9826790, Aug 7, 2018
    Last edited: Aug 7, 2018

    h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #7
    The Xeon (on the iMac Pro) doesn't have iGPU (same as the Mac Pro). Therefore, Apple must activate the iMac Pro's GPU hardware decoding and encoding ability. Otherwise, it will be way slower than even a MacBook on HEVC export. And make that super expensive "pro" machine a ridiculous joke.

    No problem, test done.

    Sony New York Fashion HDR. Smooth Screenshot 2018-08-08 at 5.50.30 AM.jpg

    Sony Whale Tonga HDR. NOT smooth
    Screenshot 2018-08-08 at 5.57.20 AM.jpg

    Sony Swordsmith HDR. NOT smooth
    Screenshot 2018-08-08 at 5.58.41 AM.jpg

    Couldn't figure out what makes the Sony New York Fashion HDR so special (I compared the media info and found nothing). But the other two video perform exactly like in High Sierra (without HEVC hardware decoding support)
     
  8. CreeptoLoser thread starter macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #8
    Thanks, man.

    Those are the results I expected.

    Even though some videos are encoded in Rec 2020 or 10 bit, it appears GPU decoding is only efficient if the video itself is less detailed and has less color palette being used.

    The fashion video isn’t so sharp if you look closely. It looked like it has been uprezzed from HD.

    Those two videos that don’t play well on the GPU are very detailed with a wide color range.

    On Kabylake CPUs and above they play completely smooth though, obviously.
     
  9. h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #9
    Thanks for the explaination but that doesn’t quite make sense to me. Bitrate is just bitrate, 71.4 and 74.5 isn’t make much difference. Variable bitrate may make some difference, however, the peak is just 114 in the Swordsmith video. Not really that high.

    It looks like able to give us “more details” in the other two videos simply becasue the picture is simpler than the fashion video (or the “rate of change of details between each frame” is less on the other two videos), therefore, more bitrate can be used to preserve the details. However, as video codec point of view, they are still HEVC, still roughly the same bitrate, the difficulty level of decoding the video is more or less the same.

    I’m fact, in video encoding / decoding aspect, the fashion video is much more demanding. Each frame has lots of changes if compared to the reference frame. This is the reason why it can’t preserve as much details as per the other two videos.

    The real issue in the case is, the behaviour suggested that other two videos don’t utilise the hard decoding, but not the GPU unable to decode them. And we can’t find out the why.
     
  10. EugW, Aug 7, 2018
    Last edited: Aug 7, 2018

    EugW macrumors 603

    EugW

    Joined:
    Jun 18, 2017
    #10
    I am away from home, and I am having trouble downloading the files on hotel WiFI. However, I did manage to download the Swordsmith 4K HDR video via my tethered cell phone. (Don't worry, I have a good data plan.) I'm getting about 17-23% overall CPU usage on my Kaby Lake Core m3 with hardware decoding, on macOS 10.13.6 High Sierra. Smoooooooth.

    Screen Shot 2018-08-07 at 11.05.48 PM.png

    The percentages listed per application in my screengrab work out to well over 30% CPU usage, but that's because there are 2 physical cores and 4 virtual cores. Activity monitor will report up to 400% CPU usage on Core m3. The real CPU usage is at the bottom, and it is 17.4%.

    This is one of the reasons I waited until 2017 to buy, BTW.

    Dunno about that site, but there are two separate versions of Sony Nature Camp. One is 8-bit SDR, and the other is 10-bit HDR.
     
  11. CreeptoLoser thread starter macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #11
    Thanks for the test but you have true Kaby Lake so no surprise it will be smooth.
    --- Post Merged, Aug 7, 2018 ---
    Bit rate is one thing but take a close look at how grainy and detailed the Samurai and Whale videos are.

    In the Fashion videos the models faces are blurry compared to better 4K content.

    There is another Fashion video on that site that is more demanding but it is a TS file and I can’t play it on macOS. It works on Windows.
     
  12. EugW macrumors 603

    EugW

    Joined:
    Jun 18, 2017
    #12
    I agree, but I just include that for reference, esp. since it's just a fanless Core m3.

    When the High Sierra betas came out last year, some people had a hard time believing their Skylake Core i7 machines would fail so bad at this.
     
  13. h9826790, Aug 7, 2018
    Last edited: Aug 7, 2018

    h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #13
    I understand that. That’s why I explained the “why”.

    For H265, the video is devided into many many reference frame.

    Each frame devided into many many different sizes squares.

    And then the encoder have to analyse the reference frame, decide the size of each square and encode them accordingly.

    The following frame will be base on the reference frame, but only contain the data about the difference. Therefore, more complex picture, or fast moving scene will cost more bitrate.

    e.g. two videos, each of them are 1min long.

    The first one shows “A” and “B” alternately ever 1/60 frame.

    The other one shows “A” for 30s, then “B” for 30s.

    Both video contains 30s of “A” and 30s of “B” in total.

    But 2nd video will be much shaper (if we pause the video) with the same bitrate because there is no change between frames (except that the 30s mark), therefore, all bitrate can be used to preserve detail.

    On the other hand, the 1st video will require lots of bitrate to “teach” the decoder how to change an A to a B (or B to A) between each frame, end up much less bitrate to preserve details.

    It’s very easy to explain what happened on that 3 videos (I mean why the fashion video is not that sharp).

    There are lots of black area in the swordsmith video, resulting more bitrate can be used the preserve the details.

    The Whale video is mainly blue, and consist lots of slow moving scene, also allow more bitrate to preserve details.

    The fashion one is relatively fast moving scenes and lots of different details on the clothes / face / etc. Which resulting require more bitrate to “describe” the changes from the reference frame. And less bitrate can be used to preserve details.

    However, on the decoder point of view. H265 is just H265, parameters are just parameters, as long as the video is encoding with the same method, and has similar bitrate. They should be all playable or all not playable for the same player.

    Also, I can hardly believe the iGPU of the Kabu lake is more powerful than the Polaris video engine (hardware wise).

    Anyway, the truth is truth, that two videos are not playable via hardware decode with a RX580 yet is the fact. But I am quite sure it’s completely software issue. Not because of lack of CPU support or the video’s are too high quality etc.

    Just like you can’t play the TS file, same codec, different container, then the player don’t know how to handle it properly. 100% software issue.
     
  14. CreeptoLoser thread starter macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #14
    Good explanation.

    I think TS is a Samsung format so I doubt it will be playable by Quicktime.
    --- Post Merged, Aug 7, 2018 ---
    Reminds me of when DVD came out. I had a PowerBook G3 Lombard. There were two models. One with software decoding that could not play DVDs and one with hardware decoding that could.
     
  15. h9826790, Aug 7, 2018
    Last edited: Aug 7, 2018

    h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #15
    TS is a standard of container. Which is widely use in board casting because it's designed for streaming, has error correction and synchronisation functions. My LG TV can also play TS 265 video. In fact, that's the very 1st gen 4K TV that can support H265, and only can play TS container's H265 video. If I have H265 video in any other container (e.g. MP4 or MKV), I have to use remux (not re-encode) that into a TS container again before I can play that on the TV (with hardware decoder, of course).

    But I don't know if it's possible to remux a video for QuickTime player. TBH, I almost never use it, until very recently because of the HEVC hardware decode support in 10.14. beta, then I start to use it. I never really try any remux for QT player.
     
  16. h9826790, Aug 21, 2018
    Last edited: Aug 22, 2018

    h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #16
    Just try to play those "problematic" HEVC video again. No problem at all. It's proved that a RX580 is all we need, no new CPU required.
    Screenshot 2018-08-22 at 5.25.56 AM.jpg
    The previous issue is actually software issue. All I need to do is just reboot, and then I can play this Sony Swordsmith HDR video smoothly in Preview.

    But once I close it and re-play it again, it become choppy. So, it's software issue, something is stuck and unable to provide hardware decoding. But not the CPU / or any other hardware is limiting.

    And that's nothing about how detail the video is.
    --- Post Merged, Aug 21, 2018 ---
    The Sony Whale Tonga HDR can also playback smoothly now
    Screenshot 2018-08-22 at 6.04.00 AM.jpg
     
  17. h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #17
    What surprise me is that now even IINA can utilise the hardware decoding on my Mac Pro 5,1 with the RX580 to smoothly playback those 4K HEVC HDR BT2020 video

     
  18. fhturner, Aug 24, 2018
    Last edited: Aug 24, 2018

    fhturner macrumors 6502

    fhturner

    Joined:
    Nov 7, 2007
    Location:
    Birmingham, AL & Atlanta, GA
    #18
    h982....(do you have an actual name we can call you? :p)...I posted this in the "official Mojave Mac Pro Metal GPU list" thread, but perhaps it's better discussed here? Pardon me and let me know if dual posting in this case is bad form:


    Thomasthegps, how many of those sample videos did you test out for HEVC decoding? This (hardware decoding for 4K H.264/265) is what I've been dying for...it's the only thing that really hamstrings my Mac Pro for editing compared to my MacBook Pro, since no Quick Sync. I don't mind waiting for encoding to use CPU, but choppy playback is a killer.

    Not sure if contrary to what Soy said above, but as of Mojave DP8, I'm only getting good results (GPU engaged and very little CPU) on 10-bit content, NOT 8-bit. But perhaps that's 10-bit Rec709? That camping video is 10-bit, as is the Bravia OLED glass-blowing video, and they play back w/ under 10% CPU usage on my 12-core 3.46GHz machine, at about 30% RX 580 GPU usage.

    The others, such as Surfing and Aquarium, are 8-bit, and they utilize a LOT more overall: 300-500% CPU and around 85% GPU. This is the same as I see in High Sierra 10.13.6...well, HS actually uses less GPU. Also, a 4K H.264 test file of my own from my Lumix G85 shows no improvement that I can tell between HS & MJ. HEVC is welcome, of course, but for me, I'd rather have 4K H.264 decode before anything.

    Thoughts? Below are my results.
    Fred

    HEVC Playback/Decode Tests
    1. Bravia OLED 4K [73Mbps, 4k60, 10-bit]
    10.13.6 HS: CPU 450-650%, GPU 40%
    10.14 DP8 MJ: CPU <10%, GPU 30%

    2. Surfing [77Mbps, 4k60, 8-bit]

    HS: CPU 350-500%, GPU 25-30%
    MJ: CPU 350-500%, GPU 85%

    3. Aquarium [80Mbps, 4k60, 8-bit]

    HS: CPU 300-450%, GPU 25-30%
    MJ: CPU 300-500%, GPU 85%

    Note that the 8-bit GPU usage in Mojave is quite a bit higher than High Sierra...but the CPU usage doesn't really change.​


    But then....

    So I went back to test further. Yes, indeed, it's a glitch, not a function of the 8-/10-bitness of the video or anything like that. It's definitely software. I didn't even need to reboot, as you said 'h'— quitting QuickTime Player and relaunching took care of it. But only for the first video loaded, even if it's not played. I will try to submit a bug report on that.

    EDIT: You mentioned "Preview", which I assume you mean QuickLook. That's not as easy to reset (as QT Player) w/o rebooting, but if you Force Quit "QuickLookUIService (Finder)" in Activity Monitor, you can avoid having to reboot each time you want to test w/ QuickLook.

    Also, still no acceleration of my 4K H.264 files. Surely the AMD UVD playback would accelerate those if it handles HEVC 4K, right?

    Fred
     
  19. h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #19
    Call me h98 is fine.

    There are at least two version of Sony camping HEVC videos can be downloaded on the internet.

    The first one is a 8bit BT709 HEVC video.
    Screenshot 2018-08-25 at 1.07.11 AM.png

    The second one is a 10bit BT2020 HEVC video.
    Screenshot 2018-08-25 at 1.07.24 AM.png

    Yeah, I mean QuickLook need reboot to play another high demanding HEVC video smoothly. I know we can restart that in terminal, but far from ideal for normal use. Anyway, I reported this bug to Apple already, already got some reply and working on it.

    IINA (1.0.0-beta3) is pretty much the same, it can play one of those BT2020 video smoothly (QuickTime must be fully closed), then we need a complete re-start of IINA to play another one.
     
  20. CreeptoLoser thread starter macrumors 6502

    CreeptoLoser

    Joined:
    Jul 28, 2018
    Location:
    Birmingham, Alabama
    #20
    Thanks for further tests.

    When iTunes will be able to play HDR videos on macOS then this will be useful.
     
  21. fhturner macrumors 6502

    fhturner

    Joined:
    Nov 7, 2007
    Location:
    Birmingham, AL & Atlanta, GA
    #21
    Hey h98, any new info from Apple on this bug report? I just tried DP10 and see that it is still there. Also, I guess I should submit a "feature request" for H.264 decoding as well...or have you already mentioned that too?
     
  22. h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #22
    Just try PB9, the bug still there.

    And no, for video decoding, I never mention the H264 issue in my bug report.

    Also, just check the hardware encoding bug. Apple fixed the QuickTime Player's export error, but not the way we want. They rather fix the hardware encoding issue, but just put us back on software encoding.
     
  23. walexago macrumors newbie

    walexago

    Joined:
    Jan 14, 2018
    #23
    Hi,

    I followed this thread with much interest because I need to replace my IMac 27 mid-2011 and I would like to buy (or build) a 4k HDR Mojave machine.

    I am waiting to Mojave's official release and some news about new iMac Pro but I'm also thinking to build an hackintosh: as hardware I would have chosen at the moment

    CPU: i7 8700K
    GPU: Vega64
    Monitor: Dell UP2718Q (true 10 bit, HDR10, DP1.4)

    These components, as far I know, are certainly able to play 4k HDR h264/h265 without problems (hardware decoding): maybe I will add also Windows (with bootcamp) to play UHD blu-ray discs.

    I have some doubts about Mojave and 2k HD-4k HDR: hardware/software encode/decode of h264/h265 videos (also with iTunes), HDR support.

    Based on the h98 test, I would say there should not be any problems but I would like to have your opinion.

    Thanks
     
  24. h9826790 macrumors G5

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #24
    It should work, even though Apple now officially said they have no intention to support the Vega card on cMP (which means no support for standard PCIe Vega graphic cards), but we know it will work because of the iMac Pro. However, you can still expect fan issues etc.
     
  25. SoyCapitanSoyCapitan

    Joined:
    Jul 4, 2015
    Location:
    Paris
    #25
    The fan issues in cMP is because off the shelf graphic cards can’t talk to the cMP’s SMC properly. In a Hackintosh that shouldn’t be a problem.

    I don’t support Hackintosh use though.
     

Share This Page

94 August 4, 2018