Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. keyword="$@"
  4.  
  5. if [[ -z "$keyword" ]]; then
  6. keyword=/tmp/`</dev/urandom tr -dc A-Za-z0-9 | head -c 8`.mkv
  7. fi
  8.  
  9. if [[ $TERM == "linux" ]]; then
  10. notify-send -t 3000 "[+] Recording desktop" "press Ctrl-+ to finish..."
  11. #notify-send -t 3000 "[+] Recording desktop" "press <Ctrl><+> to finish..."
  12. else
  13. echo "[+] Recording desktop, press <Ctrl><+> to finish..."
  14. fi
  15.  
  16. mplayer ~/data/music/Sounds/num3.ogg >> /dev/null 2>&1
  17. sleep .5
  18. mplayer ~/data/music/Sounds/num2.ogg >> /dev/null 2>&1
  19. sleep .5
  20. mplayer ~/data/music/Sounds/num1.ogg >> /dev/null 2>&1
  21. sleep .5
  22. #mplayer ~/data/music/Sounds/num0.wav
  23. #sleep 1
  24.  
  25. ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 -y $keyword
  26.  
  27. if [[ $TERM == "linux" ]]; then
  28. notify-send -t 10000 "[+] Complete" "$keyword"
  29. else
  30. echo
  31. echo "[+] Complete $keyword"
  32. echo
  33. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement