1. No user installed addons are supported, python or otherwise.
2. No, they really are not supported.
3. They are not coming back
4. Read from 1. again

Any mention of illegal streaming sites, addons or any pirated material will not be tolerated. This is not democracy and any offenders will be banned and posts deleted immediately without warning.

Other than that, we hope you enjoy MrMC so far and we welcome any input and feedback you might have.

Team MrMC.

4K HDR framerate lag on latest official build

Any issues that are tvOS specific
User avatar
davilla
Team MrMC
Posts: 4377
Joined: 26 Oct 2015, 17:01

Re: 4K HDR framerate lag on latest official build

Post by davilla »

Everbrave wrote: 05 Sep 2019, 08:59 Is the next build eminent, I.e. within few days, say next week?
BTW: selecting Video Toolbox delivers washed-out colors for HDR contents; this is not the case for AVFoundation, however, so what is the reason for this behavior?
The reason is videotoolbox uses GLES for rendering and there is no tone mapping of HDR -> SDR.
Since AVFoundation codec can handle HDR -> SDR, adding tone mapping to videotoolbox is low priority.
User avatar
Everbrave
Posts: 425
Joined: 30 Dec 2016, 23:03

Re: 4K HDR framerate lag on latest official build

Post by Everbrave »

davilla wrote: 05 Sep 2019, 23:07
Everbrave wrote: 05 Sep 2019, 08:59 Is the next build eminent, I.e. within few days, say next week?
BTW: selecting Video Toolbox delivers washed-out colors for HDR contents; this is not the case for AVFoundation, however, so what is the reason for this behavior?
The reason is videotoolbox uses GLES for rendering and there is no tone mapping of HDR -> SDR.
Since AVFoundation codec can handle HDR -> SDR, adding tone mapping to videotoolbox is low priority.
So, what is Video Toolbox doing that AVFoundation doesn’t do? Low-level HW Access? Isn’t AVFoundation using Video Toolbox as well?
User avatar
davilla
Team MrMC
Posts: 4377
Joined: 26 Oct 2015, 17:01

Re: 4K HDR framerate lag on latest official build

Post by davilla »

VideoToolBox is a video codec. It takes video demux packets and decodes them into video frames of yuv (8 or 10 bit, depending on source content). It's the caller's job to render those video frames. So MrMC takes those video frames and renders them into onto a NSView with GLES, which is then displayed on iOS/tvOS.

When VideoToolBox is selected as the codec, MrMC uses GLES to do the rendering. GLES can only do 8 bit, so HDR -> SDR but since tone mapping is not done, you get washed out colors. MrMC would have to render in Metal to get 10 bit HDR rendered with correct colors.

AVFoundation codec actually uses an API called AVSampleBufferDisplayLayer. It's the same thing that AVPlayer (apple's player) uses. It uses VideoToolBox for decode and Metal internally to decode AND render to a "layer" which we associate with a NSView. This NSView is under the GLES layer (which is transparent). So what you see is video with GLES over top.

Calling AVFoundation codec CDVDVideoCodecAVFoundation is actually over general. But calling it CDVDVideoCodecAVSampleBufferDisplayLayer looked funny so we named it CDVDVideoCodecAVFoundation :)
User avatar
Everbrave
Posts: 425
Joined: 30 Dec 2016, 23:03

Re: 4K HDR framerate lag on latest official build

Post by Everbrave »

davilla wrote: 07 Sep 2019, 16:48 VideoToolBox is a video codec. It takes video demux packets and decodes them into video frames of yuv (8 or 10 bit, depending on source content). It's the caller's job to render those video frames. So MrMC takes those video frames and renders them into onto a NSView with GLES, which is then displayed on iOS/tvOS.

When VideoToolBox is selected as the codec, MrMC uses GLES to do the rendering. GLES can only do 8 bit, so HDR -> SDR but since tone mapping is not done, you get washed out colors. MrMC would have to render in Metal to get 10 bit HDR rendered with correct colors.

AVFoundation codec actually uses an API called AVSampleBufferDisplayLayer. It's the same thing that AVPlayer (apple's player) uses. It uses VideoToolBox for decode and Metal internally to decode AND render to a "layer" which we associate with a NSView. This NSView is under the GLES layer (which is transparent). So what you see is video with GLES over top.

Calling AVFoundation codec CDVDVideoCodecAVFoundation is actually over general. But calling it CDVDVideoCodecAVSampleBufferDisplayLayer looked funny so we named it CDVDVideoCodecAVFoundation :)
Now I understand, thanks a lot :)
User avatar
davilla
Team MrMC
Posts: 4377
Joined: 26 Oct 2015, 17:01

Re: 4K HDR framerate lag on latest official build

Post by davilla »

@LeoNatan, you are clueless about how video is decoded and rendered on iOS/tvOS :)

The issue is with AVSampleBufferDisplayLayer, Apple changed its default behavior and you have to add magic sauce to restore the original behavior. AVPlayer works because they (dh'u) have added the magic sauce to AVPlayer. But they neglected to tell 3rd party developers that use AVSampleBufferDisplayLayer. Typical :)
Samekas
Posts: 12
Joined: 09 Jul 2018, 07:55

Re: 4K HDR framerate lag on latest official build

Post by Samekas »

Same problem here... Any way to downgrade version?
User avatar
amet
Team MrMC
Posts: 3787
Joined: 26 Oct 2015, 16:59
Location: Dubai/Novi Sad

Re: 4K HDR framerate lag on latest official build

Post by amet »

Samekas wrote: 16 Sep 2019, 12:30 Same problem here... Any way to downgrade version?
MrMC ? No

but... debuglog might have answers why you have issues
User avatar
davilla
Team MrMC
Posts: 4377
Joined: 26 Oct 2015, 17:01

Re: 4K HDR framerate lag on latest official build

Post by davilla »

Samekas wrote: 16 Sep 2019, 12:30 Same problem here... Any way to downgrade version?
Fixed in MrMC 3.9.2 testflight. Will be released sometime this week.
Samekas
Posts: 12
Joined: 09 Jul 2018, 07:55

Re: 4K HDR framerate lag on latest official build

Post by Samekas »

davilla wrote: 16 Sep 2019, 16:57
Samekas wrote: 16 Sep 2019, 12:30 Same problem here... Any way to downgrade version?
Fixed in MrMC 3.9.2 testflight. Will be released sometime this week.
Awesome, thank you!
User avatar
MrSpidey
Posts: 7
Joined: 23 Aug 2019, 07:52

Re: 4K HDR framerate lag on latest official build

Post by MrSpidey »

davilla wrote: 16 Sep 2019, 16:57
Samekas wrote: 16 Sep 2019, 12:30 Same problem here... Any way to downgrade version?
Fixed in MrMC 3.9.2 testflight. Will be released sometime this week.
Thank you very much.

As I am not on testflight (and assuming this works correctly), what do you think would be a reasonable time we would see it as an update to everyone else?
Post Reply