[MPlayer-users] MPlayer PHP exec
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Sep 8 17:04:59 CEST 2005
On Thu, Sep 08, 2005 at 09:04:53AM -0500, James Goddard wrote:
> 1. MPlayer insists on creating files in the $HOME/.mplayer directory.
> Since the apache user has no HOME directory this is problematic. I can
> solve this problem by prepending "HOME=/dir" to the command but that's a
> kludge. Is there anyway to prevent MPlayer from saving the
> config/registry files?
What exactly is the problem here?
If it has no home directory, the HOME variable should not be set. Then
MPlayer won't create any config files (tested and checked source).
If anything, you should do "unset HOME".
> 2. MPlayer hangs when processing a wmv file. This works great from the
> command line but fails every time when run from within my PHP script.
> If I turn off the quiet mode flags, the last thing output is "Called
> unk_GetThreadPriority" which leads me to believe there is a missing
> function in it's internal wine code to deal with the Windows DLL's.
If GetThreadPriority is called, you are in trouble - it will try to
create a thread, which is (and will not be) working.
Are you sure you use the same mplayer and dll as with the command line
> exec( "/usr/bin/mplayer -really-quiet -nolirc -nortc -noconsolecontrols
> -nojoystick -slave -ss 200000 " . $source . " -vo jpeg:outdir=/dir -ao
Hmm.. instead if -nolirc -nortc -nojoystick I would compile a special
version without support for all this... You'll probably want to disable
a lot more things, like X11, oss, alsa etc. support.
Also -nosound instead of -ao null should be a good idea...
More information about the MPlayer-users