Advertisement
metalx1000

Mplayer Slave Control Notes

Jul 26th, 2015
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #setup
  2. mkfifo /tmp/mplayer-control
  3. find `pwd` -iname "*.mp3" > /tmp/playlist  #create playlist
  4. mplayer -slave -input file=/tmp/mplayer-control --playlist="/tmp/playlist" > /tmp/mplayer-info
  5. #mplayer -slave -input file=/tmp/mplayer-control *.mp3 > /tmp/mplayer-info
  6.  
  7. #useage
  8. echo "pause" > /tmp/mplayer-control
  9. echo "seek 10" > /tmp/mplayer-control
  10. echo "seek -10" > /tmp/mplayer-control
  11. #skip songs
  12. echo "pt_step 1" > /tmp/mplayer-control
  13. echo "pt_step 1" > /tmp/mplayer-control
  14.  
  15. echo "volume 10" > /tmp/mplayer-control
  16. echo "volume -10" > /tmp/mplayer-control
  17.  
  18. #get info
  19. echo "" > /tmp/info
  20. echo "get_meta_artist" > /tmp/mplayer-control
  21. ARTIST="$(grep -a "ANS_META_ARTIST" /tmp/info|cut -d\' -f2)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement