Skip to content

Add backend support for reducing energy use#5780

Open
low-batt wants to merge 1 commit intodevelopfrom
reduce-energy
Open

Add backend support for reducing energy use#5780
low-batt wants to merge 1 commit intodevelopfrom
reduce-energy

Conversation

@low-batt
Copy link
Copy Markdown
Contributor

This commit will:

  • Add a new reduceEnergyUse setting to Preferences
  • Add a new configureEnergyUse method to PlayerCore
  • Change PlayerCore.startMPV to call the new configureEnergyUse method

When the reduceEnergyUse setting is enabled the configureEnergyUse method will apply mpv's builtin fast profile to reduce the energy used by mpv.

As the fast profile does not support restoring the old values of the options set by the profile, changes to the reduceEnergyUse setting require IINA to be restarted.


Description:

This commit will:
- Add a new reduceEnergyUse setting to Preferences
- Add a new configureEnergyUse method to PlayerCore
- Change PlayerCore.startMPV to call the new configureEnergyUse method

When the reduceEnergyUse setting is enabled the configureEnergyUse
method will apply mpv's builtin fast profile to reduce the energy used
by mpv.

As the fast profile does not support restoring the old values of the
options set by the profile, changes to the reduceEnergyUse setting
require IINA to be restarted.
@low-batt low-batt requested review from lhc70000 and uiryuu October 26, 2025 19:45
@low-batt
Copy link
Copy Markdown
Contributor Author

low-batt commented Oct 26, 2025

This PR only provides the backend support for this feature. I did not include UI as it would generate merge conflicts with some outstanding PRs.

This can be tested by enabling the feature using the defaults command:

defaults write com.colliderli.iina reduceEnergyUse true

See issue #5697 for details on the need for this change.

@low-batt low-batt self-assigned this Oct 26, 2025
@lhc70000
Copy link
Copy Markdown
Member

Is there a user request for this? I'm not sure if it's appropriate to treat them as equivalent, because MPV has many profiles, but this setting only has two options (reduce energy use or not). A user conf file can also override this, and the user might not know what's happening just looking at the name of this setting. Perhaps a profile selector would be better?

@low-batt
Copy link
Copy Markdown
Contributor Author

Good point about expanding this to be a general profile settings.

This is about issue #5697 where users with old Macs are complaining because the increase in energy use is noticeable for them and the improvement in picture quality, not so much. This is a regression for these users.

This is not for advanced users who know mpv and can create a mpv.conf file.

I was expecting we'd add a Reduce energy use setting either in general or in video. It would need some sort of explanation about reducing video quality and the need to restart IINA after changing the setting.

One of the users thought IINA ought to just do this by default for Intel Macs. I'm thinking that would not be appropriate for the newer more powerful Intel Macs.

Anyway, I only coded up the backend as I wanted advice on how to handle this.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants