Skip to content

Instantly share code, notes, and snippets.

@JonathanPorta
Last active August 27, 2022 22:20
Show Gist options
  • Save JonathanPorta/4d49ca529a64484c12b3d35f355136a3 to your computer and use it in GitHub Desktop.
Save JonathanPorta/4d49ca529a64484c12b3d35f355136a3 to your computer and use it in GitHub Desktop.
How to find which device (/dev/video...) is able to be used as a v4l2 webcam/stream?

How can we see v4l2 capable video devices?

# install via `dnf install v4l-utils`
sudo v4l2-ctl --list-devices

C922 Pro Stream Webcam
	/dev/video2
	/dev/video3
	/dev/media1

3D Camera: eTronVideo
	/dev/video0
	/dev/video1
	/dev/media0
...

But, which one of these is actually the webcam e.i. which one can provide a video capture capability?

sudo v4l2-ctl --device=/dev/video2 --all

Driver Info:
	Driver name      : uvcvideo
	Card type        : C922 Pro Stream Webcam
...
	Device Caps      : 0x04200001
		Video Capture  <==========================
		Streaming
		Extended Pix Format
...

Versus:

sudo v4l2-ctl --device=/dev/video3 --all

Driver Info:
	Driver name      : uvcvideo
	Card type        : C922 Pro Stream Webcam
...
	Device Caps      : 0x04a00000
		Metadata Capture   <==========================
		Streaming
		Extended Pix Format
...

More info: https://unix.stackexchange.com/questions/512759/multiple-dev-video-for-one-physical-device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment