mpv
mpv copied to clipboard
Change default behavior for cycling through audio tracks
mpv switching through "no audio" among all available audio tracks. On the other hand, the vast majority of players* do not include pseudo "no audio" track in a cycle, by default.
Expected behavior of the wanted feature
Change default behavior to cycle only real audio streams.
- Suggested behavior is more convenient and current behavior has no benefits over it.
- Conformance with other players; follow user expectations.
Extra information
- For the sake of good order. This is not a question about how to change cycle behavior, like https://github.com/mpv-player/mpv/issues/5396. This is a proposal to change the default behavior.
- See also https://github.com/mpv-player/mpv/issues/7639
* including, but not limited to, vlc, ffplay, mpc-hc; mpv GUI like SMPlayer, mpv.net
Log file
Not applicable
I personally agree that cycling through 'no audio' is useless because there's a more convenient 'mute' hotkey for this, and in practice you more often want to be using this hotkey to switch between different languages, rather than somehow "disabling audio".
(Cycling through 'no video' is mildly useful in case I started watching something with video but then want to put it onto a background tab as audio-only, without wasting extra GPU time from rendering frames I won't see)
We could probably provide such a command, though it's annoying that it requires a break in the abstraction. (The "cycle" command knows nothing about commands.) However, setting audio to "no" is still useful to disable all decoding and downloading of the data. It's fairly low level. A GUI frontend could choose to skip "no", or to set mute=yes to disable audio.
@haasn Thanks for putting an explanation. This is exactly what I mean under (1) point.
However, setting audio to "no" is still useful to disable all decoding and downloading of the data.
I don't argue that there are some use cases where one actually needs to disable audio output. Along with your example, I read about exclusive AOs from IRC. But seems like that is not relevant to this proposal, because dedicated binding for disabling the AO would be more appropriate for such cases.
We could probably provide such a command, though it's annoying that it requires a break in the abstraction. (The "cycle" command knows nothing about commands.)
I couldn’t agree more. How about the following options:
- Through new bundled script (like stats, osc). Pros: effortless implementation (script can be based on track-related functions from osc with stripped down logic).
- Introduce new command named like
cycle-except-values [<"!reverse">] <name> <value1> [<value2> [...]]. It will follow semantic fromcyclecommand, but skip defined values. So, we will be able to writecycle-except-values audio noand mpv will cycle through audio streams only (except value "no"). Pros: maybe will be useful somewhere else. Cons: require a bit of coding.
current behavior has no benefits over it
Just something to consider: I’ve experienced issues with high-framerate videos reporting an incorrect framerate and dropping a massive amount of frames on playback with interpolation (can’t remember what the exact combinations of settings were but will test some stuff soon) and disabling the audio via cycling fixes the juddering while muting does not.
Note for future people: here is workaround with lua script: https://github.com/viniciusbm/mpv-cycle-through-existing (found in one of linked issues)