v4l-utils
From Gentoo Wiki
v4l-utils is a set of utilities for handling media devices contained in the Video4Linux library package which can be installed by enabling the utils USE flag.
See also
See the webcam article for instructions on how to use v4l-utils to set up a webcam for video capture.
See the webcam article for instructions on how to use v4l-utils to set up a webcam for video capture.
Installation
USE flags
USE flags for media-libs/libv4l v4l-utils libraries and optional utilities
+utils
|
Build the v4l-utils collection of utilities |
bpf
|
Enable support for IR BPF decoders |
doc
|
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally |
dvb
|
Add support for DVB (Digital Video Broadcasting) |
jpeg
|
Add JPEG image support |
qt5
|
Add support for the Qt 5 application and UI framework |
qt6
|
Add support for the Qt 6 application and UI framework |
tracer
|
Build the v4l2-tracer tool and library |
Emerge
Install media-libs/libv4l:
root #
emerge --ask media-libs/libv4l
Additional packages
gtk-v4l
The GTK+ package media-tv/gtk-v4l is available for controlling webcam v4l preferences.
USE flags for media-tv/gtk-v4l A GTK+ application for controlling V4L preferences of a web cam device
v4l-dvb-saa716x
A driver for saa716x-based dvb cards is available at media-tv/v4l-dvb-saa716x.
USE flags for media-tv/v4l-dvb-saa716x driver for saa716x based dvb cards like TT S2-6400 or Skystar 2 eXpress HD
+strip
|
Allow symbol stripping to be performed by the ebuild for special files |
dist-kernel
|
Enable subslot rebuilds on Distribution Kernel upgrades |
modules-compress
|
Install compressed kernel modules (if kernel config enables module compression) |
modules-sign
|
Cryptographically sign installed kernel modules (requires CONFIG_MODULE_SIG=y in the kernel) |
v4l2loopback
media-video/v4l2loopback provides a v4l2 loopback device whose output is its own input.
USE flags for media-video/v4l2loopback v4l2 loopback device whose output is its own input
+strip
|
Allow symbol stripping to be performed by the ebuild for special files |
dist-kernel
|
Enable subslot rebuilds on Distribution Kernel upgrades |
examples
|
Install examples, usually source code |
modules-compress
|
Install compressed kernel modules (if kernel config enables module compression) |
modules-sign
|
Cryptographically sign installed kernel modules (requires CONFIG_MODULE_SIG=y in the kernel) |
gst-plugins-v4l2
Finally, a gstreamer plugin package is available: media-plugins/gst-plugins-v4l2.
USE flags for media-plugins/gst-plugins-v4l2 plugin for gstreamer
udev
|
Enable virtual/udev integration (device discovery, power and storage device support, etc) |
Usage
Invocation
user $
v4l2-ctl --help
General/Common options: --all display all information available -C, --get-ctrl <ctrl>[,<ctrl>...] get the value of the controls [VIDIOC_G_EXT_CTRLS] -c, --set-ctrl <ctrl>=<val>[,<ctrl>=<val>...] set the value of the controls [VIDIOC_S_EXT_CTRLS] -D, --info show driver info [VIDIOC_QUERYCAP] -d, --device <dev> use device <dev> instead of /dev/video0 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. -e, --out-device <dev> 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. -E, --export-device <dev> 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. -z, --media-bus-info <bus-info> 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. -h, --help display this help message --help-all all options --help-io input/output options --help-meta metadata format options --help-misc miscellaneous options --help-overlay overlay format options --help-sdr SDR format options --help-selection crop/selection options --help-stds standards and other video timings options --help-streaming streaming options --help-subdev sub-device options --help-tuner tuner/modulator options --help-vbi VBI format options --help-vidcap video capture format options --help-vidout vidout output format options --help-edid edid handling options -k, --concise be more concise if possible. -l, --list-ctrls display all controls and their values [VIDIOC_QUERYCTRL] -L, --list-ctrls-menus display all controls and their menus [VIDIOC_QUERYMENU] -r, --subset <ctrl>[,<offset>,<size>]+ the subset of the N-dimensional array to get/set for control <ctrl>, for every dimension an (<offset>, <size>) tuple is given. -w, --wrapper use the libv4l2 wrapper library. --list-devices 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-status log the board status in the kernel log [VIDIOC_LOG_STATUS] --get-priority query the current access priority [VIDIOC_G_PRIORITY] --set-priority <prio> set the new access priority [VIDIOC_S_PRIORITY] <prio> is 1 (background), 2 (interactive) or 3 (record) --silent only set the result code, do not print any messages --sleep <secs> sleep <secs>, call QUERYCAP and close the file handle --verbose turn on verbose ioctl status reporting
libcamera
media-libs/libcamera is available in GURU from various overlays[1].
Removal
Unmerge
root #
emerge --ask --depclean --verbose media-libs/libv4l
See also
- darktable — a photography workflow application and RAW developer.
- Droidcam — a tool to use a smartphone's cameras as webcam on a computer
- Ffmpeg — a cross platform, free, open source media encoder/decoder toolkit.
- gPhoto
- Jellyfin — installation and management of the jellyfin media server
- Kodi — an open source home theater application.
- Motion
- MythTV — a powerful media center and video recording software system.
- OBS Studio — free software for video recording and live streaming.
- OpenShot — an open source, cross-platform, video editor, written in Python and C++
- Streamlink — a command-line utility that can extract video streams and pipe them into a video player.
- TV Tuner — configuring and using television (TV) tuners with Gentoo Linux
External resources
- Part I - Video for Linux API - the V4L2 API kernel specification.
- Video for Linux version 2 (V4L2) examples