AFinity icon indicating copy to clipboard operation
AFinity copied to clipboard

[Feature Request] Smart player backend switching based on HDR compatibility

Open shadypt opened this issue 3 months ago • 1 comments

Problem description

Currently, users have to manually switch between LibMPV and ExoPlayer to play HDR -LibMPV does a great job with complex files but tone-maps HDR to SDR since it doesn't support HDR on Android. -ExoPlayer plays native HDR perfectly on compatible devices, but it often fails entirely (black screen/no video) with heavy HDR files like high-bitrate files.

Proposed solution

I would like to request an automated "Smart Player Selection" logic inside AFinity that handles HDR playback dynamically based on success/compatibility.

The fallback logic should work as follows:

  1. Detect HDR content: When a video contains HDR metadata.
  2. First Choice (ExoPlayer): Try to open the file with the internal ExoPlayer to achieve native HDR playback.
  3. Fallback Condition: If ExoPlayer cannot render the video stream (fails or results in a black screen), immediately fallback to LibMPV.
  4. Fallback Condition (Non-HDR devices): If the device does not support native HDR, or if ExoPlayer fails, use LibMPV with its built-in HDR-to-SDR tone mapping.

Alternatives considered

The current alternative is manually changing the default player backend in the app settings every time.

Feature area

Player/Playback

Priority

High - Significantly impacts my usage

Mockups or examples

No response

Use case

No response

Additional context

No response

Device

No response

Android version

No response

Afinity version

No response

Checklist

  • [x] I have searched for similar feature requests before creating this one
  • [x] This feature would benefit multiple users, not just myself
  • [ ] I am willing to help test this feature if implemented

shadypt avatar Aug 12 '26 13:08 shadypt

I also think automatic player backend selection depending on whether the video is HDR or SDR would be a very useful feature.

However, I would prefer having the option to manually switch the playback backend directly from the player interface as well, rather than having to navigate through the app settings every time I want to use a different backend.

I frequently switch between playback backends depending on the content, so having a quick-access option in the player would save quite a bit of time.

Ideally, automatic selection and manual switching could complement each other:

  • Automatic selection: Choose the appropriate backend based on the video's characteristics (e.g., HDR or SDR).
  • Manual selection: Allow users to override the automatic choice and switch backends directly from the playback interface.

This would provide the convenience of automatic selection without taking away user control, especially for people who frequently switch between backends for compatibility or specific playback requirements.

I am willing to help test this feature if implemented.

D4vidGarcia avatar Nov 14 '26 03:11 D4vidGarcia