Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #setup
- mkfifo /tmp/mplayer-control
- find `pwd` -iname "*.mp3" > /tmp/playlist #create playlist
- mplayer -slave -input file=/tmp/mplayer-control --playlist="/tmp/playlist" > /tmp/mplayer-info
- #mplayer -slave -input file=/tmp/mplayer-control *.mp3 > /tmp/mplayer-info
- #useage
- echo "pause" > /tmp/mplayer-control
- echo "seek 10" > /tmp/mplayer-control
- echo "seek -10" > /tmp/mplayer-control
- #skip songs
- echo "pt_step 1" > /tmp/mplayer-control
- echo "pt_step 1" > /tmp/mplayer-control
- echo "volume 10" > /tmp/mplayer-control
- echo "volume -10" > /tmp/mplayer-control
- #get info
- echo "" > /tmp/info
- echo "get_meta_artist" > /tmp/mplayer-control
- ARTIST="$(grep -a "ANS_META_ARTIST" /tmp/info|cut -d\' -f2)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement