Stremio / stremio-bugs

🐛 Post bug reports in Issues here
57 stars 9 forks source link

Brightness issue for HDR/HDR10 prints in default Stremio player on Mac OS. #646

Open gunpreet34 opened 6 months ago

gunpreet34 commented 6 months ago

TL;DR: The Stremio default player is showing very less brightness on Macbook pro 2021 (and a lot of other HDR supported devices - left for another issue). Even with 1600 nits peak brightness, some scenes are very dimly lit in HDR prints where SDR prints shines (but then again we don't have 4K SDR prints out there for every content).

Screenshots attached:

  1. External player IINA
  2. Default stremio player

I have been seeing pretty consistently and the issue is 100% reproducible. Steps to reproduce: The setup I'm using is Stremio+Torrentio+RD

  1. Find any media with HDR/HDR10+ print (Wheel of Time Season2 has almost all prints available in 4k).
  2. Play the media in default Stremio player.
  3. Copy link url from bottom corner and stream the same episode/movie in IINA player.

PS: I'm also seeing pink and green colors in Dolby Vision files but I think that's due to decoding of Macbook and that there's no player out there that could support the DV prints. Source: Reddit. If you want me to, I can open another bug for the Dolby Vision thingy.

Hoping to get the issue fixed soon, thanks for the fabulous player.

gunpreet34 commented 6 months ago

To even confirm it's HDR only problem and not a setting in IINA player, you could try streaming the 4K HDR vs 4K SDR print (again, Wheel of Time S02E01 has both versions available). Scene at 9:36 with the teardrop is very suitable for comparison.

TRtomasz commented 5 months ago

check if you have hardware acceleartion turned on in the settings if not try turning it on

kokroo commented 5 months ago

@gunpreet34 @TRtomasz I can confirm that Stremio on Apple Silicon Macs does not support HDR inside its player. This is not new information, you can find hundreds of comments on Reddit, etc. The hardware acceleration switch makes no difference to the HDR capability at least on macOS.

Stremio code needs to be updated/fixed to enable HDR playback. For example Infuse Player on macOS can successfully play HDR content from files.

TRtomasz commented 5 months ago

@kokroo We do not control the player we use MPV, if you can check and confirm that you have HDR with MPV on macos then perhaps we can have it too.

kokroo commented 5 months ago

@kokroo We do not control the player we use MPV, if you can check and confirm that you have HDR with MPV on macos then perhaps we can have it too.

I can't even find an Apple Silicon native version of MPV for macOS to test with! Reading up on Google, I see a lot of people asking about HDR support on mpv but being pointed to IINA player by others.

Is MPV just a lib, or a full-blown app with a GUI?

TRtomasz commented 3 months ago

They have an app too https://mpv.io/

kokroo commented 1 month ago

@TRtomasz https://github.com/mpv-player/mpv/issues/7341

The MPV HDR support for macOS has been added, as far as I can tell. Can we upstream the updates into the next Stremio version?

Akemi commented 1 month ago

if you are using libmpv and the render API HDR/EDR support is completely independent from the support in mpv. you have to implement it yourself by setting the correct color space on your CAOpenGLLayer yourself. that was always the case.

also this only adds HDR/EDR support on the old cocoa-cb backend. it was already supported on the new macvk/vulkan/gpu(-next) backendend before.

as an example see iina.

kokroo commented 1 month ago

if you are using libmpv and the render API HDR/EDR support is completely independent from the support in mpv. you have to implement it yourself by setting the correct color space on your CAOpenGLLayer yourself. that was always the case.

also this only adds HDR/EDR support on the old cocoa-cb backend. it was already supported on the new macvk/vulkan/gpu(-next) backendend before.

as an example see iina.

So what would we need to change in Stremio to enable this now?

Akemi commented 1 month ago

that question is quite broad isn't it? i have no insight of stremio specifically and can only give a general direction. the linked iina PR is already a good indication what needs to be done. you could also look at the commit that added support to mpv. though in the case of mpv those are options that need to be manually set, preferably to the color primaries/transfer characteristics of the VO target.

TLDR:

first 3 make macOS aware that the window/view/layer is presenting something in HDR/EDR, 3 alone tells macOS what colour space the content is rendered in, 4 tells mpv to what characteristics to render to.

also see the Apple docs for the 3 possible ways as reference. they removed the opengl ones sadly, so one has to transfer a little bit.

kprabhat248 commented 1 month ago

Also the desktop version is quite old waiting for update just like on 1.6.12 on arm