From 25e5500195ec950cbb02e3ee0da8c66ee0f98620 Mon Sep 17 00:00:00 2001 From: Vinh Quang Tran Date: Thu, 28 Oct 2021 10:56:10 +0700 Subject: [PATCH] v4l2-ctl: add page (#7099) --- pages/linux/v4l2-ctl.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pages/linux/v4l2-ctl.md diff --git a/pages/linux/v4l2-ctl.md b/pages/linux/v4l2-ctl.md new file mode 100644 index 0000000000..7e1f3ccf81 --- /dev/null +++ b/pages/linux/v4l2-ctl.md @@ -0,0 +1,32 @@ +# v4l2-ctl + +> Control video devices. +> More information: . + +- List all video devices: + +`v4l2-ctl --list-devices` + +- List supported video formats and resolutions of default video device `/dev/video0`: + +`v4l2-ctl --list-formats-ext` + +- List supported video formats and resolutions of a specific video device: + +`v4l2-ctl --list-formats-ext --device {{path/to/video_device}}` + +- Get all details of a video device: + +`v4l2-ctl --all --device {{path/to/video_device}}` + +- Capture a JPEG photo with a specfic resolution from video device: + +`v4l2-ctl --device {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat=MJPG --stream-mmap --stream-to={{path/to/output.jpg}} --stream-count=1` + +- Capture a raw video stream from video device: + +`v4l2-ctl --device {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat={{format}} --stream-mmap --stream-to={{path/to/output}} --stream-count={{number_of_frames_to_capture}}` + +- List all video device's controls and their values: + +`v4l2-ctl --list-ctrls --device {{/path/to/video_device}}`