嵌入式爱好者

查看: 18610|回复: 2

[Linux] RK3399对OV13850摄像头支持的格式

[复制链接]

3

主题

7

帖子

30

积分

RK3399通行证Hi3519A通信证i.MX6Q通行证

扫一扫,手机访问本帖
发表于 2021-2-24 15:00:20 | 显示全部楼层 |阅读模式
[root@rk3399:/userdata]# v4l2-ctl --list-formats-ext -d /dev/video1
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture Multiplanar

        [0]: 'YUYV' (YUYV 4:2:2)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [1]: '422P' (Planar YVU 4:2:2)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [2]: 'NV16' (Y/CbCr 4:2:2)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [3]: 'NV61' (Y/CrCb 4:2:2)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [4]: 'YM16' (Planar YUV 4:2:2 (N-C))
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [5]: 'NV21' (Y/CrCb 4:2:0)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [6]: 'NV12' (Y/CbCr 4:2:0)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [7]: 'NM21' (Y/CrCb 4:2:0 (N-C))
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [8]: 'NM12' (Y/CbCr 4:2:0 (N-C))
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [9]: 'YU12' (Planar YUV 4:2:0)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [10]: 'YM24' (Planar YUV 4:4:4 (N-C))
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [11]: 'GREY' (8-bit Greyscale)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [12]: 'XR24' (32-bit BGRX 8-8-8-8)
                Size: Stepwise 32x16 - 1920x1568 with step 8/8
        [13]: '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
这个可以显示。
然后[root@rk3399:/userdata]# 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 组件进行视频硬解码,它的输出格式为:NV12I420YV12”?

回复

使用道具 举报

0

主题

1

帖子

4

积分

发表于 2021-7-8 18:16:16 | 显示全部楼层
没遇到过这情况
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

21

积分

i.MX6Q通行证

发表于 2021-7-27 09:40:54 | 显示全部楼层
这和你需要先插查看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
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-20 14:48

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表