Skip to content

Instantly share code, notes, and snippets.

@pluser
Created February 27, 2021 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pluser/59526fce0aedaa089474e4f619021717 to your computer and use it in GitHub Desktop.
Save pluser/59526fce0aedaa089474e4f619021717 to your computer and use it in GitHub Desktop.
Start mpv to capture external video
#!/bin/sh
v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=0
v4l2-ctl --device /dev/video0 --get-fmt-video
mpv av://v4l2:/dev/video0 --profile=low-latency --no-correct-pts --fps=30 --demuxer-lavf-format=video4linux2 --demuxer-lavf-o=input_format=mjpeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment