executable_ffmpeg-software 1.9 KB

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. NAME=screencast-$(date +%Y%m%d%H%M)
  3. ffmpeg \
  4. -f x11grab -video_size 1920x1080 -r 30 -thread_queue_size 512 -i "$DISPLAY" \
  5. -i '/home/opykhalov/Pictures/avatar/avatar-text-curve-ask.png' \
  6. -filter_complex "[0:v][1:v] overlay=1450:850:enable='between(t,0,20)'" \
  7. -f pulse -ac 2 -thread_queue_size 512 -i 'alsa_input.pci-0000_00_1b.0.analog-stereo' \
  8. -f pulse -ac 2 -thread_queue_size 512 -i 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor' \
  9. -filter_complex amix \
  10. -y \
  11. -c:v libx264 \
  12. -qp 0 \
  13. -pix_fmt yuv420p \
  14. -b:v 9000k \
  15. -g 60 \
  16. -r 30 \
  17. -threads 4 \
  18. -preset ultrafast \
  19. -c:a libmp3lame -ar 44100 \
  20. "$NAME".mp4 \
  21. "$@"