webcam 740 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. # ▓▓▓▓▓▓▓▓▓▓
  3. # ░▓ Author ▓ Abdullah <https://abdullah.today/>
  4. # ░▓▓▓▓▓▓▓▓▓▓
  5. # ░░░░░░░░░░
  6. # This script is an effort to use mpv for screencasts when you wanna include your video too.
  7. # lets start mpv, edit the video path how your camera is appearing in your file system.
  8. mpv /dev/video0 --geometry=640x480 --no-osc --title="webcam" --no-input-default-bindings --input-conf=/dev/null --no-resume-playback --really-quiet &
  9. # camera is started in full screen, now lets resize it.
  10. sleep 1;
  11. camWindow=`xdotool search webcam`
  12. xdotool windowsize "$camWindow" 489 367
  13. # lets move it to the bottom right.
  14. xdotool windowmove "$camWindow" 1109 511
  15. exit 0