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 show-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 doing

show-text abc 2000 1

shows the text and

show-text abc 2000 3

shows nothing.

I tried chaining show-progress with show-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

EDIT: I’ve found a solution. Apparently we have to use set osg-msg3 your-text-here; show-progress, to create the text at a high enough OSD level such that it isn’t overridden by the progress bar. Strange that we have set osd-msg and show-text to display text

  • gnuhaut@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    15 days ago

    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.

    • 0WN463@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 days ago

      ah ok, looks like I misunderstood what level is supposed to mean.

      Anyways, I’ve found a solution and updated OP