[MPlayer-dev-eng] running a program with a keystroke - passing playing filename to it

Elias Gabriel Amaral da Silva tolkiendili at gmail.com
Fri Dec 17 16:44:22 CET 2010


Hello, this is my first post. I want to run a program with a
keystroke, and pass the playing filename to it (also the film
length, current position..).

I see that there is a run command. so putting run "mycommand" at
input.conf works. But I don't see how to pass the current
filename to it, or other data. Is it possible?

(I have a playlist, so the current filename changes with > and
<. If it were just one film, I could do something like
FILE="$file" mplayer "$file" and mycommand would see FILE on its
environment)

I see that some commands (like osd_show_property_text) expand
${filename}. But run runs the command as a shell script, and
inspecting run "env" I don't see a filename variable defined
there.

I think mplayer could define some variables for the execing
proccess. Like MPLAYER_FILENAME, MPLAYER_POS.. I am about to
implement it (unless there is another way to do what I
want). Does this seem reasonable?


More information about the MPlayer-dev-eng mailing list