WRTnode 2R 使用v4l-utils查看摄像头信息

首先安装v4l-utils。 > libv4l is a collection of libraries which adds a thin abstraction layer on top of video4linux2 devices. The purpose of this (thin) layer is to make it easy for application writers to support a wide variety of devices without having to write separate code for different devices in the same class. libv4l consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2. libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent of the drivers for those devices supporting v4l1 compatibility (which many v4l2 drivers do not). libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the application transparent libv4lconvert conversion where necessary. This package contains the video4linux utilities. 方法1:

方法2:

1
2
opkg update
opkg install v4l-utils

安装完成之后,我们插上摄像头,然后强制启用。不明白的话可以看WRTnode 2R 使用USB摄像头传输视频流中对USB设备的解释。

1
echo 1 > /sys/bus/usb/devices/1-1.3/bConfigurationValue

启用以后我们来使用v4l-ctl来查看摄像头输出的格式和分辨率。

1
2
v4l2-ctl --list-formats
v4l2-ctl --list-formats-ext

可以看到我这里有两个video设备,一个是MJPG的,一个是YUV的。分辨率也从320*180到1920*1080不等。