aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl/v4l2-ctl.1.in
blob: 132f51346db2c0b1ef899d3a100b3ef528f38b00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.TH "V4L2-CTL" "1" "March 2015" "v4l-utils @PACKAGE_VERSION@" "User Commands"
.SH NAME
v4l2-ctl - An application to control video4linux drivers
.SH SYNOPSIS
.B v4l2-ctl
[\fI-h\fR] [\fI-d <dev>\fR] [many other options]
.SH DESCRIPTION
The v4l2-ctl tool is used to control video4linux devices, either video, vbi, radio
or swradio, both input and output. It is able to control almost any aspect of such
devices covering the full V4L2 API.

.SH OPTIONS
.TP
\fB\-d\fR, \fB\-\-device\fR \fI<dev>\fR
Use device <dev> as the V4L2 device. If <dev> is a number, then /dev/video<dev> is used.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Turn on verbose reporting.
.TP
\fB\-w\fR, \fB\-\-wrapper\fR
Use the libv4l2 wrapper library for all V4L2 device accesses. By default v4l2-ctl will
directly access the V4L2 device, but with this option all access will go via this
wrapper library.
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints the help message.
.TP
\fB\-\-help\-io\fR
Prints the help message for all options that get/set/list inputs and outputs, both
video and audio.
.TP
\fB\-\-help\-misc\fR
Prints the help message for miscellaneous options.
.TP
\fB\-\-help\-overlay\fR
Prints the help message for all options that get/set/list overlay and framebuffer
formats.
.TP
\fB\-\-help\-sdr\fR
Prints the help message for all options that get/set/list software defined radio
formats.
.TP
\fB\-\-help\-selection\fR
Prints the help message for all options that deal with selections (cropping and
composing).
.TP
\fB\-\-help\-stds\fR
Prints the help message for all options that deal with SDTV standards and Digital
Video timings.
.TP
\fB\-\-help\-streaming\fR
Prints the help message for all options that deal with streaming.
.TP
\fB\-\-help\-subdev\fR
Prints the help message for all options that deal with v4l-subdevX devices.
.TP
\fB\-\-help\-tuner\fR
Prints the help message for all options that deal with tuners and modulators.
.TP
\fB\-\-help\-vbi\fR
Prints the help message for all options that get/set/list VBI formats.
.TP
\fB\-\-help\-vidcap\fR
Prints the help message for all options that get/set/list video capture formats.
.TP
\fB\-\-help\-vidout\fR
Prints the help message for all options that get/set/list video output formats.
.TP
\fB\-\-help\-edid\fR
Prints the help message for all options that get/set EDIDs.
.TP
\fB\-\-help\-all\fR
Prints the help message for all options.
.TP
\fB--all\fR
Display all information available.
.TP
\fB-C\fR, \fB--get-ctrl\fR \fI<ctrl>\fR[,\fI<ctrl>\fR...]
Get the value of the controls [VIDIOC_G_EXT_CTRLS].
.TP
\fB-c\fR, \fB--set-ctrl\fR \fI<ctrl>\fR=\fI<val>\fR[,\fI<ctrl>\fR=\fI<val>\fR...]
Set the value of the controls [VIDIOC_S_EXT_CTRLS].
.TP
\fB-D\fR, \fB--info\fR
Show driver info [VIDIOC_QUERYCAP].
.TP
\fB-e\fR, \fB--out-device\fR \fI<dev>\fR
Use device \fI<dev>\fR for output streams instead of the
default device as set with --device. If \fI<dev>\fR starts
with a digit, then /dev/video\fI<dev>\fR is used.
.TP
\fB-E\fR, \fB--export-device\fR \fI<dev>\fR
Use device \fI<dev>\fR for exporting DMA buffers.
If \fI<dev>\fR starts with a digit, then /dev/video\fI<dev>\fR is used.
.TP
\fB-k\fR, \fB--concise\fR
Be more concise if possible.
.TP
\fB-l\fR, \fB--list-ctrls\fR
Display all controls and their values [VIDIOC_QUERYCTRL].
.TP
\fB-L\fR, \fB--list-ctrls-menus\fR
Display all controls and their menus [VIDIOC_QUERYMENU].
.TP
\fB-r\fR, \fB--subset\fR \fI<ctrl>\fR[,\fI<offset>\fR,\fI<size>\fR]+
The subset of the N-dimensional array to get/set for control \fI<ctrl>\fR,
for every dimension an (\fI<offset>\fR, \fI<size>\fR) tuple is given.
.TP
\fB--list-devices\fR
List all v4l devices.
.TP
\fB--log-status\fR
Log the board status in the kernel log [VIDIOC_LOG_STATUS].
.TP
\fB--get-priority\fR
Query the current access priority [VIDIOC_G_PRIORITY].
.TP
\fB--set-priority\fR \fI<prio>\fR
Set the new access priority [VIDIOC_S_PRIORITY].
\fI<prio>\fR is 1 (background), 2 (interactive) or 3 (record).
.TP
\fB--silent\fR
Only set the result code, do not print any messages.
.TP
\fB--sleep\fR \fI<secs>\fR
Sleep \fI<secs>\fR, call QUERYCAP and close the file handle.
.SH EXIT STATUS
On success, it returns 0. Otherwise, it will return the error code.
.SH EXAMPLES
Query the device information of /dev/video1:

	v4l2-ctl -d1 -D

Stream video using MMAP stream I/O from /dev/video0:

	v4l2-ctl -d0 --stream-mmap

Stream one frame of video from /dev/video0 and store it in a file:

	v4l2-ctl --stream-mmap --stream-count=1 --stream-to=file.raw

Stream video from /dev/video0 and stream it over the network:

	v4l2-ctl --stream-mmap --stream-to-host <hostname>

Use 'qvidcap -p' on the host to view the video.

Stream video from /dev/video0 using DMABUFs exported from /dev/video2:

	v4l2-ctl --stream-dmabuf --export-device /dev/video2

Stream video from a memory-to-memory device:

	v4l2-ctl --stream-mmap --stream-out-mmap

Stream video from a capture video device (/dev/video1) to an output video device
(/dev/video2):

	v4l2-ctl -d1 --stream-mmap --out-device /dev/video2 --stream-out-dmabuf

.SH BUGS
This manual page is a work in progress.

Bug reports or questions about this utility should be sent to the linux-media@vger.kernel.org
mailinglist.

Privacy Policy