| 1 |
.TH "V4L2-CTL" "1" "March 2015" "v4l-utils @MAN_PACKAGE_VERSION@" "User Commands" |
| 2 |
.SH NAME |
| 3 |
v4l2-ctl - An application to control video4linux drivers |
| 4 |
.SH SYNOPSIS |
| 5 |
.B v4l2-ctl |
| 6 |
[\fI-h\fR] [\fI-d <dev>\fR] [many other options] |
| 7 |
.SH DESCRIPTION |
| 8 |
The v4l2-ctl tool is used to control video4linux devices, either video, vbi, radio |
| 9 |
or swradio, both input and output. It is able to control almost any aspect of such |
| 10 |
devices covering the full V4L2 API. |
| 11 |
|
| 12 |
.SH OPTIONS |
| 13 |
.TP |
| 14 |
\fB-A\fR, \fB--list-devices\fR |
| 15 |
List all v4l devices. If \fB-z\fR was given, then list just the |
| 16 |
devices of the media device with the bus info string as |
| 17 |
specified by the \fB-z\fR option. |
| 18 |
.TP |
| 19 |
\fB\-d\fR, \fB\-\-device\fR \fI<dev>\fR |
| 20 |
Use device \fI<dev>\fR as the V4L2 device. |
| 21 |
if \fI<dev>\fR starts with a digit, then /dev/video\fI<dev>\fR is used |
| 22 |
Otherwise if \fB-z\fR was specified earlier, then \fI<dev>\fR is the entity name |
| 23 |
or interface ID (if prefixed with 0x) as found in the topology of the media device |
| 24 |
with the bus info string as specified by the \fB-z\fR option. |
| 25 |
.TP |
| 26 |
\fB\-v\fR, \fB\-\-verbose\fR |
| 27 |
Turn on verbose reporting. |
| 28 |
.TP |
| 29 |
\fB\-\-version\fR |
| 30 |
Show version information. |
| 31 |
.TP |
| 32 |
\fB\-w\fR, \fB\-\-wrapper\fR |
| 33 |
Use the libv4l2 wrapper library for all V4L2 device accesses. By default v4l2-ctl will |
| 34 |
directly access the V4L2 device, but with this option all access will go via this |
| 35 |
wrapper library. |
| 36 |
.TP |
| 37 |
\fB\-h\fR, \fB\-\-help\fR |
| 38 |
Prints the help message. |
| 39 |
.TP |
| 40 |
\fB\-\-help\-io\fR |
| 41 |
Prints the help message for all options that get/set/list inputs and outputs, both |
| 42 |
video and audio. |
| 43 |
.TP |
| 44 |
\fB\-\-help\-meta\fR |
| 45 |
Prints the help message for all options that get/set/list metadata formats. |
| 46 |
.TP |
| 47 |
\fB\-\-help\-misc\fR |
| 48 |
Prints the help message for miscellaneous options. |
| 49 |
.TP |
| 50 |
\fB\-\-help\-overlay\fR |
| 51 |
Prints the help message for all options that get/set/list overlay and framebuffer |
| 52 |
formats. |
| 53 |
.TP |
| 54 |
\fB\-\-help\-sdr\fR |
| 55 |
Prints the help message for all options that get/set/list software defined radio |
| 56 |
formats. |
| 57 |
.TP |
| 58 |
\fB\-\-help\-selection\fR |
| 59 |
Prints the help message for all options that deal with selections (cropping and |
| 60 |
composing). |
| 61 |
.TP |
| 62 |
\fB\-\-help\-stds\fR |
| 63 |
Prints the help message for all options that deal with SDTV standards and Digital |
| 64 |
Video timings. |
| 65 |
.TP |
| 66 |
\fB\-\-help\-streaming\fR |
| 67 |
Prints the help message for all options that deal with streaming. |
| 68 |
.TP |
| 69 |
\fB\-\-help\-subdev\fR |
| 70 |
Prints the help message for all options that deal with v4l-subdevX devices. |
| 71 |
.TP |
| 72 |
\fB\-\-help\-tuner\fR |
| 73 |
Prints the help message for all options that deal with tuners and modulators. |
| 74 |
.TP |
| 75 |
\fB\-\-help\-vbi\fR |
| 76 |
Prints the help message for all options that get/set/list VBI formats. |
| 77 |
.TP |
| 78 |
\fB\-\-help\-vidcap\fR |
| 79 |
Prints the help message for all options that get/set/list video capture formats. |
| 80 |
.TP |
| 81 |
\fB\-\-help\-vidout\fR |
| 82 |
Prints the help message for all options that get/set/list video output formats. |
| 83 |
.TP |
| 84 |
\fB\-\-help\-edid\fR |
| 85 |
Prints the help message for all options that get/set EDIDs. |
| 86 |
.TP |
| 87 |
\fB\-\-help\-all\fR |
| 88 |
Prints the help message for all options. |
| 89 |
.TP |
| 90 |
\fB--all\fR |
| 91 |
Display all information available. |
| 92 |
.TP |
| 93 |
\fB-C\fR, \fB--get-ctrl\fR \fI<ctrl>\fR[,\fI<ctrl>\fR...] |
| 94 |
Get the value of the controls [VIDIOC_G_EXT_CTRLS]. |
| 95 |
.TP |
| 96 |
\fB-c\fR, \fB--set-ctrl\fR \fI<ctrl>\fR=\fI<val>\fR[,\fI<ctrl>\fR=\fI<val>\fR...] |
| 97 |
Set the value of the controls [VIDIOC_S_EXT_CTRLS]. |
| 98 |
.TP |
| 99 |
\fB-D\fR, \fB--info\fR |
| 100 |
Show driver info [VIDIOC_QUERYCAP]. |
| 101 |
.TP |
| 102 |
\fB-e\fR, \fB--out-device\fR \fI<dev>\fR |
| 103 |
Use device \fI<dev>\fR for output streams instead of the |
| 104 |
default device as set with \fB--device\fR. If \fI<dev>\fR starts |
| 105 |
with a digit, then /dev/video\fI<dev>\fR is used. |
| 106 |
Otherwise if \fB-z\fR was specified earlier, then \fI<dev>\fR is the entity name |
| 107 |
or interface ID (if prefixed with 0x) as found in the topology of the media device |
| 108 |
with the bus info string as specified by the \fB-z\fR option. |
| 109 |
.TP |
| 110 |
\fB-E\fR, \fB--export-device\fR \fI<dev>\fR |
| 111 |
Use device \fI<dev>\fR for exporting DMA buffers. |
| 112 |
If \fI<dev>\fR starts with a digit, then /dev/video\fI<dev>\fR is used. |
| 113 |
Otherwise if \fB-z\fR was specified earlier, then \fI<dev>\fR is the entity name |
| 114 |
or interface ID (if prefixed with 0x) as found in the topology of the media device |
| 115 |
with the bus info string as specified by the \fB-z\fR option. |
| 116 |
.TP |
| 117 |
\fB-z\fR, \fB--media-bus-info\fR \fI<bus-info>\fR |
| 118 |
Find the media device with the given \fI<bus-info>\fR string. If set, then |
| 119 |
\fB-d\fR, \fB-e\fR and \fB-E\fR options can use the entity name or interface ID |
| 120 |
to refer to the device nodes. Example: v4l2-ctl -z platform:vivid-000 -d vivid-000-vid-cap |
| 121 |
.TP |
| 122 |
\fB-k\fR, \fB--concise\fR |
| 123 |
Be more concise if possible. |
| 124 |
.TP |
| 125 |
\fB-l\fR, \fB--list-ctrls\fR |
| 126 |
Display all controls and their values [VIDIOC_QUERYCTRL]. |
| 127 |
.TP |
| 128 |
\fB-L\fR, \fB--list-ctrls-menus\fR |
| 129 |
Display all controls and their menus [VIDIOC_QUERYMENU]. |
| 130 |
.TP |
| 131 |
\fB-r\fR, \fB--subset\fR \fI<ctrl>\fR[,\fI<offset>\fR,\fI<size>\fR]+ |
| 132 |
The subset of the N-dimensional array to get/set for control \fI<ctrl>\fR, |
| 133 |
for every dimension an (\fI<offset>\fR, \fI<size>\fR) tuple is given. |
| 134 |
.TP |
| 135 |
\fB--list-devices-input\fR \fI<name>\fR |
| 136 |
Same as \fB--list-devices\fR, but only show devices with a current |
| 137 |
input name that matches \fI<name>\fR. |
| 138 |
.TP |
| 139 |
\fB--list-devices-output\fR \fI<name>\fR |
| 140 |
Same as \fB--list-devices\fR, but only show devices with a current |
| 141 |
output name that matches \fI<name>\fR. |
| 142 |
.TP |
| 143 |
\fB--log-status\fR |
| 144 |
Log the board status in the kernel log [VIDIOC_LOG_STATUS]. |
| 145 |
.TP |
| 146 |
\fB--get-priority\fR |
| 147 |
Query the current access priority [VIDIOC_G_PRIORITY]. |
| 148 |
.TP |
| 149 |
\fB--set-priority\fR \fI<prio>\fR |
| 150 |
Set the new access priority [VIDIOC_S_PRIORITY]. |
| 151 |
\fI<prio>\fR is 1 (background), 2 (interactive) or 3 (record). |
| 152 |
.TP |
| 153 |
\fB--silent\fR |
| 154 |
Only set the result code, do not print any messages. |
| 155 |
.TP |
| 156 |
\fB--sleep\fR \fI<secs>\fR |
| 157 |
Sleep \fI<secs>\fR, call QUERYCAP and close the file handle. |
| 158 |
.SH EXIT STATUS |
| 159 |
On success, it returns 0. Otherwise, it will return the error code. |
| 160 |
.SH EXAMPLES |
| 161 |
Query the device information of /dev/video1: |
| 162 |
|
| 163 |
v4l2-ctl -d1 -D |
| 164 |
|
| 165 |
Stream video using MMAP stream I/O from /dev/video0: |
| 166 |
|
| 167 |
v4l2-ctl -d0 --stream-mmap |
| 168 |
|
| 169 |
Stream one frame of video from /dev/video0 and store it in a file: |
| 170 |
|
| 171 |
v4l2-ctl --stream-mmap --stream-count=1 --stream-to=file.raw |
| 172 |
|
| 173 |
Stream video from /dev/video0 and stream it over the network: |
| 174 |
|
| 175 |
v4l2-ctl --stream-mmap --stream-to-host <hostname> |
| 176 |
|
| 177 |
Use 'qvidcap -p' on the host to view the video. |
| 178 |
|
| 179 |
Stream video from /dev/video0 using DMABUFs exported from /dev/video2: |
| 180 |
|
| 181 |
v4l2-ctl --stream-dmabuf --export-device /dev/video2 |
| 182 |
|
| 183 |
Stream video from a memory-to-memory device: |
| 184 |
|
| 185 |
v4l2-ctl --stream-mmap --stream-out-mmap |
| 186 |
|
| 187 |
Stream video from a capture video device (/dev/video1) to an output video device |
| 188 |
(/dev/video2): |
| 189 |
|
| 190 |
v4l2-ctl -d1 --stream-mmap --out-device /dev/video2 --stream-out-dmabuf |
| 191 |
|
| 192 |
.SH BUGS |
| 193 |
This manual page is a work in progress. |
| 194 |
|
| 195 |
Bug reports or questions about this utility should be sent to the [email protected] |
| 196 |
mailinglist. |