Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No subtitles / no audio features #27

Open
hansinator opened this issue Jan 3, 2020 · 4 comments
Open

No subtitles / no audio features #27

hansinator opened this issue Jan 3, 2020 · 4 comments
Assignees

Comments

@hansinator
Copy link

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?

@open-dynaMIX
Copy link
Owner

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 open-dynaMIX self-assigned this Jan 3, 2020
@open-dynaMIX
Copy link
Owner

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

@hansinator
Copy link
Author

hansinator commented Feb 3, 2020

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

open-dynaMIX added a commit that referenced this issue Feb 19, 2020
This commit adds a new key "audio-support" to the status response json.

It is `false` if the only audio device found by mpv is `auto`. As this
can be subject to change, it gets reevaluated on every `/status`
request.

Related to #27
open-dynaMIX added a commit that referenced this issue Feb 19, 2020
This commit adds a new key "audio-support" to the status response json.

It is `false` if the only audio device found by mpv is `auto`. As this
can be subject to change, it gets reevaluated on every `/status`
request.

Related to #27
@vapier
Copy link
Contributor

vapier commented Aug 21, 2020

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

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

No branches or pull requests

3 participants