Advertisement
metalx1000

Canon DSLR as Webcam

Sep 24th, 2022
1,508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.67 KB | Source Code | 0 0
  1. #Canon DSLR as webcam
  2. #supported devices
  3. #http://gphoto.org/proj/libgphoto2/support.php
  4. #refernce video https://www.youtube.com/watch?v=TsuY4o2zLVQ
  5.  
  6. sudo apt install v4l2loopback-utils gphoto2 ffmpeg
  7. sudo modprobe v4l2loopback exclusive_caps=1 max_buffer=2
  8. gphoto2 --stdout --set-config liveviewsize=0 --capture-movie | ffmpeg  -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 -s:v 1920x1080 -r 25 /dev/video2
  9.  
  10. #to auto load module after reboot
  11. sudo vim /etc/modules-load.d/modules.conf                                    
  12. dslr-webcam
  13.  
  14. sudo vim /etc/modprobe.d/dslr-webcam.conf
  15. alias dslr-webcam v4l2loopback
  16. options v4l2loopback exclusive_caps=1 max_buffers=2
Tags: dslr webcam canon
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement