How to use MPV IPC to display both media title name and progress bar?
-
Hey, I am trying to create an IPC command that shows both the media title and the progress bar.
So far,
show-progress
displays the bar and the elapse time.And I can use
how-text "${media-title}"
to show the title.But I can't seem to do both.
I saw this in the docs
show-text <text> [<duration>|-1 [<level>]] Show text on the OSD. The string can contain properties, which are expanded as described in Property Expansion. This can be used to show playback time, filename, and so on. no-osd has no effect on this command. <duration> The time in ms to show the message for. By default, it uses the same value as --osd-duration. <level> The minimum OSD level to show the text at (see --osd-level).
And thought the
level=3
is what I needed, but doingshow-text abc 2000 1'
shows the text and
show-text abc 2000 3
shows nothing.
I tried chaining
show-progress
withshow-text
, but that also doesn't work cause they override each other.Any help would be appreciated, cause I feel like I am missing something simple here
-
L [email protected] shared this topic
-
Setting level to 3 in show-text just means that the it won't show up unless the user has set
--osd-level
to at least 3. It's like specifying how important the message is, so the user can disable less important information while still showing other stuff. It has nothing to do with what you're trying to do.I don't know enough about mpv's IPC stuff to know to show the progress bar and some text at the same time, sorry.
-
This is for positioning the text, isn't it?
It doesn't change the fact that they are overriding each other
-
ah ok, looks like I misunderstood what
level
is supposed to mean.Anyways, I've found a solution and updated OP