TheBeastLT / torrentio-scraper

Apache License 2.0
354 stars 60 forks source link

[Request] Option to disable showing HDR. #67

Closed Zero0Q closed 1 year ago

Zero0Q commented 2 years ago

Hi, could you add a option to hide or not showing HDR files when searching? Thanks

TheBeastLT commented 2 years ago

No, adding configuration options should only be for important things, since otherwise it will confuse and make it harder to maintain this addon. Unless this gets requested by more users.

Arcitec commented 1 year ago

@TheBeastLT This is something that would help us a lot...

In two ways.

Reason 1:

The Chromecast with Google TV is the most recommended media player for Stremio...

If you connect it to a NON-HDR TV and you try to play HDR content in Stremio, then Stremio almost crashes. The decoding slows down to around 1 FPS. The GUI freezes.

So people with SDR TVs must painstakingly scroll past every HDR video that Torrentio puts in Stremio.

People with HDR TVs are fine and can play both formats.

The reason why SDR TVs fail is because Chromecast with Google TV hasn't got hardware-accelerated HDR-to-SDR tone mapping conversion. This affects Stremio, Kodi and any other players that don't check the device capabilities.

https://forum.kodi.tv/showthread.php?tid=357396&page=33

https://www.reddit.com/r/Chromecast/comments/xaupew/ccgwtv_doesnt_seem_to_be_powerful_enough_to_tone/

The reason why the issue isn't more known is because HDR never needs to be tone mapped to SDR on official streaming apps since they serve ONLY SDR content to SDR televisions.

The problems only happen with custom players that try to output HDR on a SDR TV.

HDR content plays fine on a HDR TV. In fact, on a Dolby Vision TV, you can set the Google TV to "always convert all content to DV" AND it will permanently upconvert HDR AND SDR to DV. The conversion problems only happen if you do the reverse; if you force a HDR-capable TV to SDR mode in Google TV and try to play HDR content, the device freezes again, exactly like if you try playing on a normal SDR TV. And the freeze happens regardless of content resolution, as long as it is HDR format. This confirms that the device itself is incapable of converting HDR down to SDR.

Maybe Google will fix tonemapping performance someday. Or maybe it is impossible due to lack of hardware support.

Reason 2:

Having an option to filter out unsupported formats makes the stream selection list much smaller and more efficient to navigate. Which is especially important now due to Stremio's redesign for Android TV where every stream is a HUGE button and very slow to scroll through to find the stream that is compatible with your device.

It might be good to implement a "Format Filter" setting with checkboxes for HDR and 4K, which are the two things that people would benefit from removing depending on their devices.

The question isn't if this feature is a good thing. My only real question is: Should this filtering be in Torrentio, or in Stremio? I lean towards the latter.

If the Torrentio addon somehow exports Metadata about each stream (HDR, 4k Etc) then I think Stremio should do the filtering, to remove 4K and HDR streams on devices that don't need it.

If the Stremio addon API can only export a plaintext title, description and stream URL then I think the addon protocol should be extended to allow more details so that Stremio can filter it.

Or as a last resort implementing the filtering in Torrentio directly.

This kind of format filtering is something that apps such as Netflix already do automatically. They don't serve Dolby Vision content to SDR TVs for example. There is no reason to show HDR streams on a SDR TV. HDR tone mapping hangs Chromecast, and even if it works it has issues with unnatural color at best, and looks worse than official SDR versions anyway.

Edit: Actually... Implementing filters inside Torrentio would suck if you use multiple devices. Some of which support HDR AND 4K, and others which only do 1080p SDR, etc. If the filter is stored inside Torrentio then it would be awkward unless every playback device has the exact same capabilities. This is a clear indication that filtering away unsupported formats should be a task for Stremio, not for individual plugins.

Here's what is needed:

  1. If Stremio's addon API doesn't have per-stream Metadata about resolution and HDR/SDR mode yet, then that has to be added.
  2. Torrentio needs to export Metadata about each stream (resolution and HDR).
  3. After that, Stremio can have per-device settings to hide 4K and hide HDR. Maybe even an automatic setting which detects the device capabilities and hides HDR streams on SDR devices, and optionally even hides streams that are higher resolution than the device.

This implementation would work for all devices and all addons.

So again, filtering away unsupported formats per playback device is not a job for addons. It is something that Stremio itself would do much better.

Arcitec commented 1 year ago

After talking to Stremio's lead developer, I realized that this is not a job for Stremio for 1 reason:

Addons don't provide accurate data. So there is no point in filtering about it.

Torrentio relies on scanning filenames for tags. A movie might be named "Movie 2022 Blu-ray" and Torrentio would have no way to know that it contains DV/HDR. So there are no guarantees that a lack of a HDR tag in Torrentio means that it's not HDR.

Therefore, the suggestion went back here instead and the Stremio developer's answer was basically "the addon should filter out those results".

Torrentio can at least scan for and remove HDR and DV results. It would not be accurate enough to be an official feature in Stremio itself. But definitely good enough to be a removal feature in Torrentio. Something like "Hide movies with tags: HDR, DV, 4K".

Edit to mention again why it matters so much: Google Chromecast on SDR TVs freezes if it tries to play HDR. A fix is probably never gonna come for it. The issue has been talked about ever since the device came out 2 years ago, and all other apps simply never stream HDR to that device when the TV doesn't support it. So Google has no reason to fix the bug.

Unfortunately my old and non-technical parents now have a Chromecast on SDR TV. It is great apart from this issue. I have to tell them to never click HDR movies since that bombs their TV. Which is even worse since modern movies are a sea of HDR streams and it takes time to scroll to find the SDR streams. It is not a good experience. Especially for my parents with poor eyesight who can't read the Stremio stream list well.

There isn't even any point in showing HDR results on a SDR TV. Tonemapping will always look much worse than the official SDR version.

That is my personal reason for wishing that Torrentio would have a way to filter out unwanted tags. The two most universally unwanted ones are HDR (anything tagged HDR/DV/DolbyVision/Dolby Vision) and 4K (anything tagged 4K/2160p).

I have even thought of writing a proxy for Torrentio which sits in between and deletes the unsupported streams from the results. But hosting that would be difficult and it would never be as good as integration in Torrentio itself, since your tag scanner is amazing... :)

TheBeastLT commented 1 year ago

@Bananaman I've added ability to exclude any of the HDR types (HDR/HDR10+/DV) or only DV when it's the single HDR profile available.

and 4K (anything tagged 4K/2160p).

This was already possible, in config you can select to exclude 4k quality.

Arcitec commented 1 year ago

@TheBeastLT Hey, I thought I already replied to you earlier, apologies!

I am incredibly grateful that you added the filtering. I am seriously thankful. You're awesome! My parents are now able to use Stremio without so much risk of crashing! In fact, Google came up with a new OS update which fixes the crash when tonemapping HDR to SDR TVs, but the HDR movies look absolutely terrible (color artifacts etc) due to bad tonemapping, so even though the crashes are now fixed, this new feature still makes all movies/shows look way better since the chance that my parents pick a good looking, true SDR stream is now closer to 100% thanks to your filters! :) I love you.