[MPlayer-users] Problems with running MPlayer at command line in Windows

The Wanderer inverseparadox at comcast.net
Fri Jul 21 08:56:36 CEST 2006


Rob Hymus wrote:

> I am trying to extract .JPG images from video files by running the 
> following command:
> 
> /"program files"/mplayer/mplayer -ss 5 -frames 1 -vo jpeg -nosound 
> d:\testvid\video1.wmv
> 
> When I run the command at d:\ I get the error in the image posted:

Image attachments are bad, especially to a plaintext forum such as a
mailing list (and even more so when some of the participants are on
dialup - as some of the developers are). I also reiterate what RC said.

> When I run the command in the folder where the movie file is, I get
> the needed *.jpg files outputted in the folder where the movie file
> is.
> 
> In the root folder, if I change the command to output as *.png files,
> the command runs with no error, but puts the files in the root
> folder where I run the command from not the folder where the movie
> file is.

That's because there is no error involved; for all MPlayer knows, you
might not have write access to the directory where the video file is, so
it puts the images in the directory you ran it from (which is a more
likely bet to be writable).

> Am I running mplayer correct, or is there something I am missing.

I don't see any problems with the above offhand, no. (Although changing
two things at once - the directory you're running from and the format
you're outputting - is going to, at best, confuse the people who might
try to help you. If you're trying to create PNG images, why did you
bring up '-vo jpeg' in the first place? If you're trying to create
JPEGs, why change to '-vo png'?)

> My goal is to run mplayer from the root, create jpg images as 
> screenshots and have them placed in the folder where the movie file 
> originates from.

I don't think that that can be done the way you're wanting to. MPlayer
will, pretty much always, put its output files in the directory it was
run from (except in special cases like "-ao pcm:file=<name>").

If you're running *nix, as it appears from the fact that your path used
slashes for directory separators, you could write a shell script to
change to the correct directory and run the command (and, if necessary
in your shell, change back afterwards); if you're running Windows, as it
appears from the fact that you mentioned a directory called "Program
Files" and a drive named "D:\", I've got no clue what solutions there
might be.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.



More information about the MPlayer-users mailing list