[MPlayer-users] Quoting and manipulating variables in mplayer slave mode

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Apr 25 00:02:15 CEST 2011


On Sun, Apr 24, 2011 at 11:27:44PM +0200, David Liontooth wrote:
> On 04/24/2011 11:56 AM, Reimar Döffinger wrote:
> >>Is this correct? And there's no way to do on-the-fly string
> >>>  manipulations in this second case?
> >Of course there is, probably something like
> >echo "osd_show_property_text \"\${filename}\" 1000 0"
> >But that is exclusively a propert of your shell and has nothing
> >at all to do with MPlayer, just look at the output of just
> >running the "echo" without redirecting it to MPlayer.
> >Either way this is rather the wrong place to ask since it
> >doesn't really have much to to with MPlayer itself.echo "osd_show_text '${FIL//_/ }' 1000 0">  $FIFO
> 
> Reimar is missing the point here -- we're talking about retrieving a
> property value from mplayer by passing a variable (and outputting to
> OSD); I can't reproduce that in the shell.

You can reproduce the "learning how to use shell quoting" tutorial
without MPlayer.
And by all I can tell your problem is that you have little of an
idea about shell quoting and the MPlayer lists aren't the
right place to learn about it.

> Passing these commands to mplayer via fifo gives these results:
> 
>     echo 'osd_show_property_text "${filename}" 1000 0' > $FIFO
> 
> Expands variable (property value is retrieved and displayed in OSD)

$ echo 'osd_show_property_text "${filename}" 1000 0'
osd_show_property_text "${filename}" 1000 0

>   echo "osd_show_property_text "${filename}" 1000 0" > $FIFO

$ echo "osd_show_property_text "${filename}" 1000 0"
osd_show_property_text  1000 0

Hardly MPlayer's fault it doesn't work, or what?

>   echo "osd_show_property_text "${filename//_/ }" 1000 0" > $FIFO

$ echo "osd_show_property_text "${filename//_/ }" 1000 0"
osd_show_property_text  1000 0

No idea what you were trying but you failed to make a difference
even before anything reaches MPlayer.

> Again, is there a way to manipulate these property values on the
> fly? I'm feeling pretty confident the answer is no.

You know, you could at least have tried the variant I suggested.
Asking questions is rather pointless if you just ignore the answers given.


More information about the MPlayer-users mailing list