v4l2-ctl -d /dev/video10 --set-selection=target=crop,width=1280,height=720 --set-fmt-video=width=640,height=480,pixelformat=NV21 --stream-mmap=3 --stream-to=mp.out --stream-count=1 --stream-poll --stream-skip=3
v4l2-ctl -d /dev/video10 --set-fmt-video=width=640,height=480,pixelformat=NV21 --stream-mmap=3 --stream-to=mp.out --stream-count=1 --stream-poll --stream-skip=3
v4l2-ctl -d /dev/video10 --set-selection=target=crop,width=640,height=480 --set-fmt-video=width=640,height=480,pixelformat=YUYV --stream-mmap=3 --stream-to=mp.out --stream-count=1 --stream-poll --stream-skip=3
v4l2-ctl --verbose -d /dev/video10 --set-fmt-video=width=1280,height=720,pixelformat='NV12' --stream-mmap --stream-count=1 --set-selection=target=crop,top=0,left=0,width=1280,height=720 --stream-to=mp.yuv
v4l2-ctl --verbose -d /dev/video10 --set-fmt-video=width=640,height=480,pixelformat='NV12' --stream-mmap --stream-count=1 --set-selection=target=crop,top=0,left=0,width=640,height=480 --stream-to=mp1.yuv
v4l2-ctl --verbose -d /dev/video10 --set-fmt-video=width=1280,height=720,pixelformat='YUYV' --stream-mmap --stream-count=1 --set-selection=target=crop,top=0,left=0,width=1280,height=720 --stream-to=mp.yuv
//显示Camera所有信息
# v4l2-ctl -d /dev/video0 --all
# v4l-ctl -D
//播放yuyv422格式数据
# ffplay -i mp.yuv -pix_fmt yuyv422 -s 1280x720
//获取支持的编码格式
# v4l2-ctl --list-formats -d /dev/video10
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
Index : 1
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
//获取支持的camera设备
# v4l2-ctl --list-devices -d /dev/video10
# v4l2-ctl -d /dev/video10 --list-ctrls
./v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='NV12' --stream-mmap --stream-count=1 --set-selection=target=crop,top=0,left=0,width=1920,height=1080 --stream-skip=3 --stream-to=mp.yuv
./v4l2-ctl --list-devices 列出所有设备
./v4l2-ctl -d /dev/video0 --list-formats-ext 列出video0对应的支持的分辨率格式
./v4l2-ctl --all -d /dev/video0 列出video0对应的所有信息,分辨率,控制参数等
v4l2-ctl -d /dev/video0 --list-ctrls 列出video0对应的控制参数
./v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=MJPG --stream-mmap --stream-to=./tmp2.jpg --stream-count=1
./v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=MJPG --stream-mmap --stream-to=./output_2560.mjpg --stream-count=30
pixelformat 可以为 MJPG YUYV NV12 NV21 H264
echo 0xffff >/sys/module/uvcvideo/parameters/trace