Scroll to navigation

V4L2-CTL(1) 1.26.1"" V4L2-CTL(1)

NAME

v4l2-ctl - An application to control video4linux drivers

SYNOPSIS

v4l2-ctl [-h] [-d <dev>] [many other options]

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.

OPTIONS

Use device <dev> as the V4L2 device. if <dev> starts with a digit, then /dev/video<dev> is used Otherwise if -z was specified earlier, then <dev> is the entity name or interface ID (if prefixed with 0x) as found in the topology of the media device with the bus info string as specified by the -z option.
Turn on verbose reporting.
Show version information.
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.
Prints the help message.
Prints the help message for all options that get/set/list inputs and outputs, both video and audio.
Prints the help message for all options that get/set/list metadata formats.
Prints the help message for miscellaneous options.
Prints the help message for all options that get/set/list overlay and framebuffer formats.
Prints the help message for all options that get/set/list software defined radio formats.
Prints the help message for all options that deal with selections (cropping and composing).
Prints the help message for all options that deal with SDTV standards and Digital Video timings.
Prints the help message for all options that deal with streaming.
Prints the help message for all options that deal with v4l-subdevX devices.
Prints the help message for all options that deal with tuners and modulators.
Prints the help message for all options that get/set/list VBI formats.
Prints the help message for all options that get/set/list video capture formats.
Prints the help message for all options that get/set/list video output formats.
Prints the help message for all options that get/set EDIDs.
Prints the help message for all options.
Display all information available.
Get the value of the controls [VIDIOC_G_EXT_CTRLS].
Set the value of the controls [VIDIOC_S_EXT_CTRLS].
Show driver info [VIDIOC_QUERYCAP].
Use device <dev> for output streams instead of the default device as set with --device. If <dev> starts with a digit, then /dev/video<dev> is used. Otherwise if -z was specified earlier, then <dev> is the entity name or interface ID (if prefixed with 0x) as found in the topology of the media device with the bus info string as specified by the -z option.
Use device <dev> for exporting DMA buffers. If <dev> starts with a digit, then /dev/video<dev> is used. Otherwise if -z was specified earlier, then <dev> is the entity name or interface ID (if prefixed with 0x) as found in the topology of the media device with the bus info string as specified by the -z option.
Find the media device with the given <bus-info> string. If set, then -d, -e and -E options can use the entity name or interface ID to refer to the device nodes. Example: v4l2-ctl -z platform:vivid-000 -d vivid-000-vid-cap
Be more concise if possible.
Display all controls and their values [VIDIOC_QUERYCTRL].
Display all controls and their menus [VIDIOC_QUERYMENU].
The subset of the N-dimensional array to get/set for control <ctrl>, for every dimension an (<offset>, <size>) tuple is given.
List all v4l devices. If -z was given, then list just the devices of the media device with the bus info string as specified by the -z option.
Log the board status in the kernel log [VIDIOC_LOG_STATUS].
Query the current access priority [VIDIOC_G_PRIORITY].
Set the new access priority [VIDIOC_S_PRIORITY]. <prio> is 1 (background), 2 (interactive) or 3 (record).
Only set the result code, do not print any messages.
Sleep <secs>, call QUERYCAP and close the file handle.

EXIT STATUS

On success, it returns 0. Otherwise, it will return the error code.

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

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.

March 2015 v4l-utils