Video4Linux

Device drivers for real-time video capture

Video4LinuxRepository| git.linuxtv.org/v4l-utils.git

|

Written in| C
Operating system| Linux
Platform| Linux kernel
License| GNU General Public License
Website| www.linuxtv.org

Video4Linux (V4L for short) is a collection of device drivers and an API for supporting realtime video capture on Linux systems.[1] It supports many USB webcams, TV tuners, and related devices, standardizing their output, so programmers can easily add video support to their applications.

Video4Linux is responsible for creating V4L2 device nodes aka a device file (/dev/videoX, /dev/vbiX and /dev/radioX) and tracking data from these nodes. The device node creation is handled by V4L device drivers using the video_device struct (v4l2-dev.h) and it can either be allocated dynamically or embedded in another larger struct.

Video4Linux was named after Video for Windows (which is sometimes abbreviated "V4W"), but is not technically related to it.[2][3]

While Video4Linux is only available on Linux, there is a compatibility layer available for FreeBSD called Video4BSD. This provides a way for many programs that depend on V4L to also compile and run on the FreeBSD operating system.

## History[edit]

V4L had been introduced late into the 2.1.X development cycle of the Linux kernel. Retroactively being renamed to V4L1, it was dropped in kernel 2.6.38.[4]

V4L2 is the second version of V4L. Video4Linux2 fixed some design bugs and started appearing in the 2.5.x kernels. Video4Linux2 drivers include a compatibility mode for Video4Linux1 applications, though the support can be incomplete and it is recommended to use Video4Linux1 devices in V4L2 mode. The project DVB-Wiki is now hosted on LinuxTV web site.[5]

Some programs support V4L2 through the media resource locator `v4l2://`.

## Software support[edit]

* aMSN
* Cheese (software)
* Cinelerra
* CloudApp
* Ekiga
* FFmpeg
* FreeJ
* GStreamer
* Guvcview
* kdetv
* Kopete
* Libav
* Linphone
* LiVES
* MPlayer
* mpv
* MythTV
* Open Broadcaster Software[6]
* OpenCV
* Peek
* PyGame
* Skype
* Tvheadend
* VLC media player
* xawtv
* Xine
* ZoneMinder

## Criticism[edit]

Video4Linux has a complex negotiation process, which caused not all applications having support for all cameras.[7]

## See also[edit]

* Direct Rendering Manager – defines a kernel-to-user-space interface for access to graphics rendering and video acceleration
* Mesa 3D – implements video acceleration APIs

## References[edit]

1. ^ "An Introduction to the Video4Linux Framework: How to write a video capture driver". 2014-02-02. Retrieved 2014-02-16.
2. ^ "Overview of the V4L2 driver framework". Archived from the original on 2014-02-21. Retrieved 2013-12-04. Overview of the V4L2 driver framework.
3. ^ "Path to a Standardized Video Codec API" (PDF). Archived from the original on 2014-01-06.
4. ^ "gspca - LinuxTVWiki". LinuxTV. Retrieved 2024-01-12.
5. ^ Schimek, Michael H. "Video for Linux Two API Specification". LinuxTV. Retrieved 2024-01-12.
6. ^ "Open Broadcaster Software | OBS". obsproject.com.
7. ^ Corbet, Jonathan (2019-07-25). "Access to complex video devices with libcamera". LWN.net. Retrieved 2023-02-06.

## External links[edit]

* media_tree development git
* v4l-utils development git
* Linux Media Infrastructure API (V4L2, DVB and Remote Controllers)
* Video4Linux-DVB wiki
* Video4Linux resources
* Video4BSD, a Video4Linux emulation layer
* Video For Linux (V4L) sample applications
* Video For Linux 2 (V4L2) sample application
* Access Video4Linux devices from Java
* kernel.org
* OpenWrt Wiki
* Linux UVC driver and tools, USB video device class (UVC)

* v
* t
* e

Linux kernel

Organization|

| Kernel|

* Linux Foundation
* Linux Mark Institute
* Linus's law
* Tanenbaum–Torvalds debate
* Tux
* SCO disputes
* Linaro
* GNU GPL v2
* menuconfig
* Supported computer architectures
* Kernel names
* Criticism

|

Support|

* Developers
* The Linux Programming Interface
* kernel.org
* LKML
* Linux conferences
* Users
* Linux User Group (LUG)

Technical|

| Debugging|

* CRIU
* ftrace
* kdump
* Linux kernel oops
* SystemTap
* BPF

|

Startup|

* vmlinux
* System.map
* dracut
* initrd
* initramfs

ABIs|

* Linux Standard Base
* x32 ABI

APIs|

| Kernel|

| System Call
Interface|

* POSIX
* ioctl
* select
* open
* read
* close
* sync
* …
* Linux-only
* futex
* epoll
* splice
* dnotify
* inotify
* readahead
* …

|

In-kernel|

* ALSA
* Crypto API
* io uring
* DRM
* kernfs
* Memory barrier
* New API
* RCU
* Video4Linux
* IIO

Userspace|

| Daemons,
File systems|

* devfs
* devpts
* debugfs
* FUSE
* procfs
* sysfs
* systemd
* udev
* Kmscon

|

Wrapper
libraries|

* C standard library
* glibc
* uClibc
* Bionic
* libhybris
* dietlibc
* EGLIBC
* klibc
* musl
* Newlib
* libcgroup
* libdrm
* libalsa
* libevdev
* libusb
* liburing

Components|

* Kernel modules
* BlueZ
* cgroups
* Console
* bcache
* Device mapper
* dm-cache
* dm-crypt
* DRM
* EDAC
* evdev
* Kernel same-page merging (KSM)
* LIO
* Framebuffer
* LVM
* KMS driver
* Netfilter
* Netlink
* nftables
* Network scheduler
* perf
* SLUB
* zram
* zswap

* Process and I/O schedulers:
* Brain Fuck Scheduler
* Completely Fair Scheduler (CFS)
* Earliest eligible virtual deadline first (EEVDF)
* Noop scheduler
* O(n) scheduler
* O(1) scheduler
* SCHED_DEADLINE
* SCHED_FIFO
* SCHED_RR

* Security Modules: AppArmor
* Exec Shield
* seccomp
* SELinux
* Smack
* Tomoyo Linux
* Linux PAM

* Device drivers
* 802.11
* graphics
* Raw device

* initramfs
* KernelCare
* kexec
* kGraft
* kpatch
* Ksplice

Variants|

* Mainline
* Linux kernel
* Linux-libre
* High-performance computing
* INK
* Compute Node Linux
* SLURM
* Real-time computing
* RTLinux
* RTAI
* Xenomai
* PREEMPT_RT
* MMU-less
* μClinux
* PSXLinux

| Virtualization|

* Hypervisor
* KVM
* Xen
* OS-level virtualization
* Linux-VServer
* Lguest
* LXC
* OpenVZ
* Other
* L4Linux
* ELinOS
* User-mode Linux
* MkLinux
* coLinux

|

Adoption|

| Range
of use|

* Desktop
* Embedded
* Gaming
* Thin client:
* LTSP
* Server:
* LAMP
* LYME-LYCE
* Devices

|

Adopters|

* List of Linux adopters

* Linux portal
* Free and open-source software portal
* Category

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template