simple-mpv-webui icon indicating copy to clipboard operation
simple-mpv-webui copied to clipboard

No subtitles / no audio features

Open hansinator opened this issue 5 years ago • 4 comments

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?

hansinator avatar Jan 03 '20 15:01 hansinator

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.

open-dynaMIX avatar Jan 03 '20 16:01 open-dynaMIX

@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.

open-dynaMIX avatar Jan 28 '20 20:01 open-dynaMIX

Feb 03 13:26:01 Freitag-Player02 startx[6465]: [observe_all] property 'audio-device-list' changed to '{{"name" = "auto", "description" = "Autoselect device"}}'

hansinator avatar Feb 03 '20 13:02 hansinator

@hansinator what audio-output driver are you using ? is it null ? the property to observe is current-ao there.

vapier avatar Aug 21 '20 08:08 vapier