Create a named pipe.
mkfifo /tmp/mplayer-control
Run it in slave mode
mplayer -slave -input file=/tmp/mplayer-control mymusic.mp3
Now in another terminal i can make mplayer pause
or quit
echo "pause" > /tmp/mplayer-control
echo "quit" > /tmp/mplayer-control
How to make mplayer continue when to issue a command via echo "pause" > /tmp/mplayer-control
.
All my failed tries.
echo "continue" > /tmp/mplayer-control
echo "go on" > /tmp/mplayer-control
echo "play" > /tmp/mplayer-control
pause
is a toggle. So to resume after a pause
, you send another pause
command.