[MPlayer-users] -slave and perl

Mark Zealey mark at zealos.org
Wed Jan 15 10:31:40 CET 2003


On Tue, Jan 14, 2003 at 07:16:22PM -0700, Michael Halcrow wrote:

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]

> I'm hacking the dvd2divxscript.pl script. I want to sample a few random
> sections of the video with -vop cropdetect, and then choose the most
> frequently displayed value as the crop value (yeah, it's an ugly hack,
> but it works most of the time, which is my goal).
> 
> Right now, I'm using my EDL system to jump around in the video, but I
> would really rather send commands via mplayer's -slave mode for this
> operation. Any Perl hackers out there know how to send commands to
> mplayer in slave mode from within a script?
> 
> Specifically, I'd like to do something like:
> 
> wait 5 seconds
> skip forward
> wait 5 seconds
> skip forward
> wait 5 seconds
> quit

You want IPC::Open2 or maybe even 3 - not sure what tty's the stuff comes out
on. (See the perldoc pages about it)


-- 

Mark Zealey (aka JALH on irc.oftc.net: #zealos and many more)
mark at zealos.org; mark at itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a17! C++++>$ P++++>+++++$ L+++>+++++$
!E---? W+++>$ !w--- r++ !t---?@ !X---?  !R- !tv b+ G+++ e>+++++ !h++* r!-- y



More information about the MPlayer-users mailing list