Advertisement
metalx1000

MPV v4l2 webcam display

Mar 21st, 2021
4,425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.55 KB | None | 0 0
  1. #using Webcam with MPV
  2. sudo apt install mpv v4l2loopback-utils
  3.  
  4. #play video stream
  5. mpv /dev/video0
  6. mpv av://v4l2:/dev/video0
  7.  
  8. #set resolution
  9. v4l2-ctl --set-fmt-video=width=1920,height=1080
  10. v4l2-ctl --set-fmt-video=width=720,height=480
  11.  
  12. #the video will only use resolutions that are supported by your camera
  13. #if you put something not supported it will go to the closest supported
  14. #and you can also just give one of the dimensions (exmaple: height)
  15. #and it will get the width
  16. v4l2-ctl --set-fmt-video=width=720
  17. v4l2-ctl --set-fmt-video=width=200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement