[MPlayer-users] Bash mplayer slave

Oliver Seitz info at vtnd.de
Sun May 20 21:59:22 CEST 2012


>>
>> It is possible - it's useless to modify the output of the "echo",
>> though. You have to modify MPlayer's output.
>>
>> Greets,
>> Kiste
>
> Can you give me an example?
> I hope it can be done without rebuilding mplayer,
> because I write a bash script for some one else.

     #!/bin/bash
     mkfifo /tmp/phone/pipe
     mplayer -slave -quiet -idle -input file=/tmp/phone/pipe music.mp3 | 
cut -d "=" -f 2 &

     while [ i > 1 ]; do
         sleep 1
         echo get_percent_pos > /tmp/phone/pipe
     done

Greets,
Kiste


More information about the MPlayer-users mailing list