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