[MPlayer-users] Scripting MPlayer try 2

pnunn pnunn at infoteq.com.au
Tue Sep 11 09:29:59 CEST 2007


Thanks to the help of Gullaume and Jack I've got closer to where I need to be 
with this scripting problem I'm having.

I've managed to get a script running as....

#!/bin/bash

loop=1
while [ $loop -gt 0 ]; do
        for X in ../Download/*.mp4
        do
                ./getfix
                echo $X>>fixlog
                #mplayer -vo xll -really-quiet -noboarder -fs $X
                mplayer -vo x11 -really-quiet -noborder -fs echo $X 
&>/dev/null
        done
        #for debugging
        echo $loop>>fixlog
        let loop=loop+1
done

which happily plays and logs the files in the directory.  However, between 
each movie, it drops back briefly to the background screen which I can't let 
happen.

So.. I started looking at slave mode.

I used the command line

mplayer -fs -fixed-vo -slave -idle -input file=/home/pnunn/.mplayer/pipe

after creating the pipe and by sending a file to the pipe with

 echo "loadfile /home/pnunn/Download/robot-chicken-gummy-bear.mp4 1" 
> /home/pnunn/.mplayer/pipe

the first file plays just fine.  When it ends, the screen stays up and I 
thought I was nearly there.

however, when I send another file to the pipe, it plays in a small window in 
the top corner of the screen (not full screen).. also, I need a way for the 
script to be able to determine when the playing file has finished so that it 
can log the information I need and start the next one.

Any more ideas please... I really need to get this last bit sorted soon...

I'll keep digging too.

Thanks so much.

Peter.



More information about the MPlayer-users mailing list