[MPlayer-users] Bash mplayer slave
Floris
jkfloris at dds.nl
Sun May 20 21:21:54 CEST 2012
Maybe this is a stupid question, but I can't find an answer.
#!/bin/bash
mkfifo /tmp/phone/pipe
mplayer -slave -quiet -idle -input file=/tmp/phone/pipe music.mp3 &
while [ i > 1 ]; do
sleep 1
echo get_percent_pos > /tmp/phone/pipe | cut -d= -f2
done
or
while [ 1 = 1 ]; do
sleep 1
echo get_percent_pos > /tmp/phone/pipe | awk -F\= '{print $2}'
done
The output is the same:
...
ANS_PERCENT_POSITION=1
ANS_PERCENT_POSITION=1
ANS_PERCENT_POSITION=2
ANS_PERCENT_POSITION=2
...
Is it possible to have this:
1
1
2
2
and pipe this to zenity --progress
thanks,
Flo
More information about the MPlayer-users
mailing list