2009/10/3 Oliver Seitz <info at vtnd.de> > > > As you already did it, and reinventing the wheel is useless... > > Any clue or code to share ? ;) > > The "nothing to play"- Video runs in an endless loop > > mplayer -idle -slave -input file=/tmp/mplayer-input -loop 0 idle_video.avi > > When there's something to play, I send something like > > echo "loadfile action1.avi" >/tmp/mplayer-input > > That file plays again in a loop until the user is fed up with it, and the > "idle" video starts again, again in a loop. > > If the video should play just once, I would have started it by a sequence > like > > loop -1 > loadfile action1.avi > loadfile idle_video.avi append > > Then I would at regular intervals issue > > get_file_name > > to find out if the action1.avi was finished playing to then reset it to an > endless loop. > > Good luck! > > Greets, > Kiste > Btw I had a look at gnome-mplayer, but won't do the trick as I send video to a plain Xserver, no desktop and no artifacts. I just want to see the video. Well, got some little time to test that this week end but.... if I launch mplayer -nosound -x 800 -y 600 -quiet -framedrop -nolirc -slave -idle -osdlevel 0 -vo xvidix:rage128 -input file=/tmp/mplay I can launch files with echo "loadfile video.wmv" > /tmp/mplay If I send echo "loadfile video.wmv" > /tmp/mplay then echo "loadfile video2.wmv *1" > /tmp/mplay* and then echo "loadfile video3.wmv" > /tmp/mplay video3 plays ok, and then it plays again video2 !!!! Dammit, there might be something I do not catch with playslist or tree :) If I put -loop 0 idle_video.avi in the command line and then send loop -1, then loadfile video1, video1 will play in loop. I'm unable to unloop... After all those tries, and many others in fact, I lost more hair, almost bald now ! I'll take another way has I can not stream to mplayer in php and there's no easy way to know if mplayer has finished playing a file... I'll test playback with pcntl_alarm as I know the length of each video and which one I throwed at mplayer, I'll be able to send another loadfile just in time. If I got time, I might hack a bit the source to send a 'I'm done playing video xxxxxxx.avi' to stdout :P Anyway, I learned something today, so was a good day ! Greets, Cedric