Forrest logo
back to the v4l2-ctl tool

v4l2-ctl:tldr:977e9

v4l2-ctl: List supported video formats and resolutions of a specific video device.
$ v4l2-ctl --list-formats-ext --device ${path-to-video_device}
try on your machine

The command "v4l2-ctl --list-formats-ext --device ${path-to-video_device}" is used to list all the supported video formats and capabilities of a video device using the v4l2-ctl tool.

Here is a breakdown of the command and its components:

  • "v4l2-ctl": This is the name of the command-line tool used for controlling video devices in Linux. It provides various options to configure and get information about video devices.

  • "--list-formats-ext": This is an option for v4l2-ctl that specifies to list the supported video formats in an extended format. This means providing detailed information about each format like pixel format, size, and frame rates.

  • "--device ${path-to-video_device}": This option specifies the path to the video device file. You need to replace "${path-to-video_device}" with the actual path to the video device you want to inspect. For example, it could be "/dev/video0" or "/dev/video1", depending on the system configuration and the number of video devices connected.

By running this command, you will get a list of supported video formats and their related properties for the specified video device. This information can be helpful for configuring video capture settings or understanding the capabilities of a video device.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the v4l2-ctl tool