CogentRedTester / mpv-scripts

A collection of scripts for mpv player
MIT License
252 stars 19 forks source link

How to specify no-osd with the new syntax of the Cycle-commands plugin? #7

Closed Dupond closed 4 years ago

Dupond commented 4 years ago

Hello!

Thanx for keeping maintaining and improving your code; the new syntax is great! Easier to read, and efficient!

Since the command is now written to the OSD, is there a way to set "no-osd"? The problem is that only the last subset of the command is written to the OSD, so it doesn't always make sense; for example let's say that you have the following command:

V script-message cycle-commands "set sub-font Sans ; set sub-color \"#FFFF00\" ; set sub-ass-override force" "set sub-font Sans ; set sub-color \"#000000\" ; set sub-ass-override force"

It will write set sub-ass-override force to the OSD (and only that, not the previous parts of the command) each time you press the V key. It's not very helpful ;) So I would prefer that it doesn't write anything at all. Is this possible?

I've tried to add no-osd at diferent places in the command, but it never had any effect...

Thanx for the help!

CogentRedTester commented 4 years ago

I was waiting for you to ask me this :)

Since the new api call acts like a normal input.conf syntax the player will try to print to the osd for every command, but since they overwrite each-other, only the last command you call will actually show up, hence the sub-ass-override message.

If you want nothing simply put no-osd in front of everything:

V script-message cycle-commands "no-osd set sub-font Sans ; no-osd set sub-color \"#FFFF00\" ; no-osd set sub-ass-override force" "no-osd set sub-font Sans ; no-osd set sub-color \"#000000\" ; no-osd set sub-ass-override force"

It may be slightly annoying for you since you've gotten used to the old system, but for someone coming straight from input.conf commands the new way should make much more sense.

CogentRedTester commented 4 years ago

Alternatively you could add another show-text command at the end of each cycle showing something more descriptive (that's what I do)

Dupond commented 4 years ago

It's a great idea. Thank you very much for your answer!