[MPlayer-users] Quick (and hopefully simple) Mplayer query

Alexander Strasser eclipse7 at gmx.net
Mon Oct 28 23:44:55 EET 2019


Hi Paul!

On 2019-10-28 06:39 -0000, Paul Strickland wrote:
[...]
>
> I need to automatically pause a video being played, as soon as it starts.
> This will allow me to do various set up tasks, before I just hit SPACE to
> get the whole thing going. I suspect it's a simple parameter, but for the
> life of me, I can't see how to do it.

Disclaimer: Not sure why you need to pause exactly. Maybe there are better
ways to achieve your goal in general.

If you can use slave mode, you can consider using the -slave together with
-idle to avoid having to specify a file to play in the command line.

Then you can either do what you need to do and start playing after
calling loadfile with the name of the file to play. Or if you prefer
starting immediately and pausing you could use "pausing loadfile" to
achieve that.

For details on slave mode and the available commands have a look at:

  https://mplayerhq.hu/DOCS/tech/slave.txt

To give you an example. If you the following into a text file
slave-commands.txt:

    pausing loadfile test.avi

Then start MPlayer with

    mplayer -idle -slave -input file=slave-commands.txt

It should start decoding the file and should pause after displaying
the first frame. The key controls should still work as expected, so
you can then unpause the video or quit or...


> I'm running Mplayer, on windows 10, from a .bat file.


  Alexander


More information about the MPlayer-users mailing list