Re: Is there a mplayer command to run a custom command?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



On 20 Aug, Mike Castle wrote:
> On Thu, Aug 20, 2009 at 7:28 AM, Dom H<speedsix.lists@xxxxxxxxxxxxxx> wrote:
> > I'm not sure this is going to do what I want (or I can't see how)
> >
> > I want mplayer to function as normal but have the ability for it to
> > pass the filename off to an external script at the press of a button.
> > I'm sure I found an mplayer command which executed an external command
> > but don't think I could get it to pass the filename.
> 
> From looking at command.c, it looks like the only command that does
> properties expansion is MP_CMD_OSD_SHOW_PROPERTY_TEXT
> (osd_show_property_text)
> 
> You can do something like:
> INS osd_show_property_text "${path}"
> 
> and internally, it calls m_properties_expand_string() to turn the
> ${path} into something useful.
> 
> It doesn't look like MP_CMD_RUN (run) does anything similar.
> 
> You might be able to use the show_property example to modify run for
> your local use (just to see if it works the way you want).
> 
> If it works well, you might submit a patch.  It seems to me like it
> wouldn't need a separate command to have this type of feature... I
> mean, really, how many people would do something like:
> 
> KEY run "echo ${PATH}"
> 
> to use an environment variable rather than a property?
> 
> Well, OK, maybe some folks do, and you'd really need a new command like:
> run_with_property
> 
> mrc
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users@xxxxxxxxxxxx
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users

If you redirect mplayer's console output to a log, you can run 'get_property path' 
and then use the tail of the log (sed'ing as needed) in your script.  I do something 
like this to bookmark my position in movies I'm watching.  It is pretty 
clumsy, but it works.
 
Phillip
_______________________________________________
MPlayer-users mailing list
MPlayer-users@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux