Advertisement
metalx1000

Fake Webcam/Video input device

Sep 30th, 2018
1,649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #Fake Webcam
  2. #Using your screen as a webcam input device
  3. #install drivers and tools
  4. sudo apt install v4l2loopback-utils
  5.  
  6. #Load Module/Driver
  7. sudo modprobe v4l2loopback
  8.  
  9. #capture screen and pipe it to your video device
  10. ffmpeg -f x11grab -r 15 -s 1920x1080 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
  11.  
  12. #now you should be able use it with software that uses Video/Webcam input.
  13. #Note: Cheese doesn't seem to like it.
  14. guvcview
  15. mpv av://v4l2:/dev/video0
  16.  
  17.  
  18. ##############Video file to Web Cam###############
  19. #note here will be no sound from the video
  20. ffmpeg -re -i input.mp4 -map 0:v -f v4l2 /dev/video0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement