simple-mpv-webui
simple-mpv-webui copied to clipboard
No subtitles / no audio features
Hi, I am using MPV compiled without audio and subtitles. Is there a possibility to detect if audio and or subtitle support is deactivated and include that information in one of the api endpoints response such that the webui can remove or disable the subtitle and audio related buttons?
Hey @hansinator
Thanks for bringing this up. I did something similar for the chapter buttons (just deactivating them). But hiding makes even more sense.
I will see how to get this information from mpv as soon as I find the time.
@hansinator Unfortunately I did not find an easy way to get this information. For audio I can query the audio-device-list. It would be interesting to see how that looks on your system. For getting it, you could use the observe-all.lua script, that's included in mpv. On my system it's under /usr/share/mpv/scripts/:
mpv --scripts=/usr/share/mpv/scripts/observe-all.lua /PATH/TO/SOME/MEDIA/FILE | grep "'audio-device-list' changed to"
For subtitles this is more difficult. What we can do in any case, is to disable subtitle input elements if no subtitle tracks are available.
Feb 03 13:26:01 Freitag-Player02 startx[6465]: [observe_all] property 'audio-device-list' changed to '{{"name" = "auto", "description" = "Autoselect device"}}'
@hansinator what audio-output driver are you using ? is it null ? the property to observe is current-ao there.