VLC and Desktop keybindings
calvin
thegnuer
In major time waste of my life  found the way that i can control vlc from desktop  keyboard  short keys . Here is the prepration for the reciepe. 

1. install the freeking vlc software ... its pain to get it working on the dekstop which don't support communities updates
    got working somehow with corrrect ffmpeg version
2. get the keybord binding software ..that is easy xbindkeys.
3. now stich it together .
4. make sure that we are running vlc with http interface up
      e.g.  vlc -I http
more info at  offical vlc site  also read the doc @ this link
 


$cat ~/.xbindkeysrc

# Pause
"export DISPLAY=:0.0 ;/home/sachinr/bin/vlc_commands pause "
  control+Mod1+p

# start 
"export DISPLAY=:0.0 ;/home/sachinr/bin/vlc_commands start"
  control+Mod1+m


# next 
"export DISPLAY=:0.0 ;/home/sachinr/bin/vlc_commands next"
  control+Mod1+n


# prev  
"export DISPLAY=:0.0 ;/home/sachinr/bin/vlc_commands back"
  control+Mod1+b



And then create the wrapper progamme 


$ cat ~/bin/vlc_commands
#!/bin/sh

CURL="/usr/bin/curl"
URI="http://localhost:8080/requests/status.xml?command="


case $1 in

pasue)
CMD="pause" ;
;;

stop)
CMD="stop" ;
;;

start)
CMD="play" ;
;;

next)
CMD="next"
;;

back)
CMD="previous" ;
;;
*)
CMD="play" ;
;;
esac

CMD="pl_$CMD";
$CURL "$URI$CMD" 2>/dev/null  1>/dev/null

exit 0 ;

 
Tags:

?

Log in