RK3399对OV13850摄像头支持的格式
# v4l2-ctl --list-formats-ext -d /dev/video1ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
: 'YUYV' (YUYV 4:2:2)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: '422P' (Planar YVU 4:2:2)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'NV16' (Y/CbCr 4:2:2)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'NV61' (Y/CrCb 4:2:2)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'YM16' (Planar YUV 4:2:2 (N-C))
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'NV21' (Y/CrCb 4:2:0)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'NV12' (Y/CbCr 4:2:0)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'NM21' (Y/CrCb 4:2:0 (N-C))
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'NM12' (Y/CbCr 4:2:0 (N-C))
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'YU12' (Planar YUV 4:2:0)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'YM24' (Planar YUV 4:4:4 (N-C))
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'GREY' (8-bit Greyscale)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'XR24' (32-bit BGRX 8-8-8-8)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
: 'RGBP' (16-bit RGB 5-6-5)
Size: Stepwise 32x16 - 1920x1568 with step 8/8
然后我用
gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, format=NV12, width=640, \
height=480, framerate=30/1 ! waylandsink
这个可以显示。
然后# gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw
, format=YV12, width=640, height=480, framerate=30/1 ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.002559083
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
这个YV12格式为啥不能显示呢?
资料上不是说“”“OK3399 使用 mppvideodec 组件进行视频硬解码,它的输出格式为:NV12,I420,YV12”?
没遇到过这情况 这和你需要先插查看gst-inspect-1.0 v4l2src 和waylandsink的属性看他们是否支持YV12。
如果v4l2src支持 waylandsink不支持的话 可以改成如下添加一个videoconvert转换格式
gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw
, format=YV12, width=640, height=480, framerate=30/1 ! videoconvert ! waylandsink
页:
[1]