gst-launch-1.0
OV5645 测试
OV5645 的测试方法与UVC Camera的测试方法基本相同。首先确认OV5645的设备节点。
root@OK8MP:~# v4l2-ctl --list-devices
查看摄像头支持的格式与分辨率:
root@OK8MP:~# v4l2-ctl --list-formats-ext -d /dev/video0
摄像头预览
root@OK8MP:~# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,
format=YUY2, width=1280, height=960,framerate=30/1 ! imxvideoconvert_g2d ! queue !
video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink
摄像头拍照:
root@OK8MP:~# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 num-buffers=10 !
video/x-raw,format=YUY2,width=1280,height=960,framerate=30/1 ! jpegenc !
filesink location=picov.jpeg
运行完之后会在当前目录下生成然picov.jpeg,拷贝到Windows下,打开此文件可以看到拍到的照片。
3. 摄像头预览时录像:
root@OK8MP:~# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,
format=YUY2, width=1280, height=960,framerate=30/1 ! imxvideoconvert_g2d ! tee name=t !
queue ! video/x-raw, format=RGB16, width=1280, height=720 ! filesink
location=5645_video.rgb16 t. ! queue ! waylandsink