查看摄像头设备
qldeng@ubuntu:~$ v4l2-ctl --list-devices
USB 2.0 Camera: USB Camera (usb-0000:02:03.0-1):
/dev/video0
/dev/video1
查看当前摄像头支持的视频压缩格式
qldeng@ubuntu:~$ v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
查看摄像头所有参数
qldeng@ubuntu:~$ v4l2-ctl -d /dev/video0 --all
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB 2.0 Camera: USB Camera
Bus info : usb-0000:02:03.0-1
Driver version: 5.4.124
Capabilities : 0x84A00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'MJPG'
Field : None
Bytes per Line : 0
Size Image : 614989
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 640, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=40
contrast 0x00980901 (int) : min=0 max=64 step=1 default=32 value=45
saturation 0x00980902 (int) : min=0 max=128 step=1 default=64 value=64
hue 0x00980903 (int) : min=-40 max=40 step=1 default=0 value=0
white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1
gamma 0x00980910 (int) : min=72 max=500 step=1 default=100 value=100
gain 0x00980913 (int) : min=0 max=100 step=1 default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2
white_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive
sharpness 0x0098091b (int) : min=0 max=6 step=1 default=5 value=4
backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=0 value=2
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3
exposure_absolute 0x009a0902 (int) : min=1 max=5000 step=1 default=157 value=157 flags=inactive
exposure_auto_priority 0x009a0903 (bool) : default=0 value=1
查看摄像头所支持的分辨率
qldeng@ubuntu:~$ v4l2-ctl --list-framesizes=MJPG -d /dev/video0
ioctl: VIDIOC_ENUM_FRAMESIZES
Size: Discrete 4656x3496
Size: Discrete 4208x3120
Size: Discrete 4000x3000
Size: Discrete 3264x2448
Size: Discrete 2592x1944
Size: Discrete 2320x1744
Size: Discrete 2304x1728
Size: Discrete 2048x1536
Size: Discrete 1920x1080
Size: Discrete 1600x1200
Size: Discrete 1280x960
Size: Discrete 1280x720
Size: Discrete 1024x768
Size: Discrete 800x600
Size: Discrete 640x480