af-toggle causes label not found warning
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv version and platform
mpv 0.30.0 Arch Linux
Reproduction steps
~/.config/mpv/mpv.conf
af-add=@loudnorm:!lavfi=[loudnorm=I=-23:LRA=20:TP=-1,aresample=48000]
[audio-norm]
af-toggle=@loudnorm
Then play any file with and without --profile=audio-norm.
Expected behavior
No warning. When mpv checks the configuration the label @loudnorm is included in profile [audio-norm].
Actual behavior
No matter if the profile is activated I get the warning Option af-toggle: Label loudnorm not found.
Despite the warning it works. Playing a file without the profile [audio-norm] leaves the filter disabled and with the profile the filter is activated.
Thoughts
It's also interesting that the warning appears even if the label is defined in profile [audio-norm] itself. Is af|vf-toggle deprecated? There is no option entry in the man page either. Just af|vf toggle for input.conf.
I don't know if there is anything that can realistically be done about the warning when checking the config. In this example [default] is always included in [audio-norm] which is why the toggle works.
But one could also define the label in another profile which isn't included. If it works at runtime would then depend on the order the profiles are applied through input.conf and --profile=.
Should this particular warning message therefore only be displayed when the toggle is being applied at runtime? It currently also gives the warning when checking the config.
Maybe the way I use it also doesn't make the most sense. I wanted to define a label once and then use something like af-add=@loudnorm which would do nothing if it is already activated. So chaining profiles wouldn't neccessarily toggle it back off again. But add expects an actual filter after the label.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuration in ~/.config/mpv/mpv.conf and trace how af-toggle validates labels during config checking versus runtime profile application. Reproduce with the [audio-norm] profile and the @loudnorm label; done means the warning behavior matches whether the label is available when the toggle is applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- audio-video-rtc, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100