Toybrick

TB-RV1126 透過rkmedia抓取影像資料的問題

ianfan

新手上路

积分
7
楼主
发表于 2021-10-13 17:55:43    查看: 9550|回复: 5 | [复制链接]    打印 | 只看该作者
本帖最后由 ianfan 于 2021-10-13 18:05 编辑

透過v4l2-ctl可從Macbook Air的type-c port抓取出YUV資料,資料驗證後沒有問題
  1. v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=3840,pixelformat=NV12 --stream-mmap=3 --stream-to=/tmp/NV12.out --stream-count=1
复制代码

rkmedia也有方式可以抓取出YUV資料
  1. rkmedia_vi_get_frame_test -c 1 -o yuv.out
复制代码
但執行後的結果如下
  1. media get entity by name: rkcif-lvds-subdev is null
  2. media get entity by name: rkcif-lite-lvds-subdev is null
  3. media get entity by name: stream_cif is null
  4. media get entity by name: rkcif-dvp-sof is null
  5. [07:03:40.904846][CAMHW]:XCAM ERROR CamHwIsp20.cpp:181: 181:parse sensor entity name lt7911d 4-002b error at 0, please check sensor driver !
  6. [07:03:40.905270][CAMHW]:XCAM ERROR CamHwIsp20.cpp:118: @get_sensor_caps /dev/v4l-subdev3: Get sensor module info failed
  7. media get entity by name: rkisp-mpfbc-subdev is null
  8. media get entity by name: rkisp_dmapath is null
  9. media get entity by name: rkcif_dvp is null
  10. media get entity by name: rkcif_mipi_lvds is null
  11. media get entity by name: rkcif_dvp is null
  12. media get entity by name: rkcif_lite_mipi_lvds is null
  13. media get entity by name: rkcif_mipi_lvds is null
  14. [07:03:40.907466][CAMHW]:XCAM ERROR CamHwIsp20.cpp:940: get isp or ispp info fail, something gos wrong!
  15. Rga built version:1.04 356036d+2021-10-08 14:50:37
  16. #####Device: stream_cif_mipi_id0
  17. #####Resolution: 1920x1080
  18. #####Frame Count to save: 100
  19. #####Output Path: a.out
  20. #CameraIdx: 0

  21. ##RKMEDIA Log level: 2
  22. [RKMEDIA][SYS][Info]:text is all=2
  23. [RKMEDIA][SYS][Info]:module is all, log_level is 2
  24. [RKMEDIA][SYS][Info]:RK_MPI_VI_EnableChn: Enable VI[0:0]:stream_cif_mipi_id0, 1920x1080 Start...
  25. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media0
  26. media get entity by name: rkcif-lvds-subdev is null
  27. media get entity by name: rkcif-lite-lvds-subdev is null
  28. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media1
  29. media get entity by name: rkisp-mpfbc-subdev is null
  30. media get entity by name: rkisp_dmapath is null
  31. [RKMEDIA][SYS][Info]:RKAIQ: model(rkisp0): isp_info(0): isp-subdev entity name: /dev/v4l-subdev4
  32. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media2
  33. [RKMEDIA][SYS][Info]:RKAIQ: model(rkispp0): ispp_info(0): ispp-subdev entity name: /dev/v4l-subdev0
  34. [RKMEDIA][SYS][Info]:#V4l2Stream: camraID:0, Device:stream_cif_mipi_id0
  35. [RKMEDIA][SYS][Info]:libv4l2 is not configured.
  36. [RKMEDIA][VI][Info]:Create stream v4l2_capture_stream failed
  37. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: stream off....
  38. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: read thread exit sucessfully!
  39. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: stream reset sucessfully!
  40. [RKMEDIA][SYS][Warn]:VI[0]:"stream_cif_mipi_id0" buffer may be occupied by other modules or apps, try again...
  41. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media0
  42. media get entity by name: rkcif-lvds-subdev is null
  43. media get entity by name: rkcif-lite-lvds-subdev is null
  44. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media1
  45. media get entity by name: rkisp-mpfbc-subdev is null
  46. media get entity by name: rkisp_dmapath is null
  47. [RKMEDIA][SYS][Info]:RKAIQ: model(rkisp0): isp_info(0): isp-subdev entity name: /dev/v4l-subdev4
  48. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media2
  49. [RKMEDIA][SYS][Info]:RKAIQ: model(rkispp0): ispp_info(0): ispp-subdev entity name: /dev/v4l-subdev0
  50. [RKMEDIA][SYS][Info]:#V4l2Stream: camraID:0, Device:stream_cif_mipi_id0
  51. [RKMEDIA][SYS][Info]:libv4l2 is not configured.
  52. [RKMEDIA][VI][Info]:Create stream v4l2_capture_stream failed
  53. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: stream off....
  54. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: read thread exit sucessfully!
  55. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: stream reset sucessfully!
  56. [RKMEDIA][SYS][Warn]:VI[0]:"stream_cif_mipi_id0" buffer may be occupied by other modules or apps, try again...
  57. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media0
  58. media get entity by name: rkcif-lvds-subdev is null
  59. media get entity by name: rkcif-lite-lvds-subdev is null
  60. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media1
  61. media get entity by name: rkisp-mpfbc-subdev is null
  62. media get entity by name: rkisp_dmapath is null
  63. [RKMEDIA][SYS][Info]:RKAIQ: model(rkisp0): isp_info(0): isp-subdev entity name: /dev/v4l-subdev4
  64. [RKMEDIA][SYS][Info]:RKAIQ: parsing /dev/media2
  65. [RKMEDIA][SYS][Info]:RKAIQ: model(rkispp0): ispp_info(0): ispp-subdev entity name: /dev/v4l-subdev0
  66. [RKMEDIA][SYS][Info]:#V4l2Stream: camraID:0, Device:stream_cif_mipi_id0
  67. [RKMEDIA][SYS][Info]:libv4l2 is not configured.
  68. [RKMEDIA][VI][Info]:Create stream v4l2_capture_stream failed
  69. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: stream off....
  70. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: read thread exit sucessfully!
  71. [RKMEDIA][VI][Info]:#SourceStreamFlow[]: stream reset sucessfully!
  72. <font color="#ff0000">[RKMEDIA][SYS][Warn]:VI[0]:"stream_cif_mipi_id0" buffer may be occupied by other modules or apps, try again...
  73. Create VI[0] failed! ret=-11</font>
  74. root@debian10:/home/toybrick#
复制代码

是什麼程序佔用了stream_cif_mipi_id0? 該如何排除? 謝謝。
  1. root@debian10:/home/toybrick# ps -e
  2. PID TTY          TIME CMD
  3.    1 ?        00:00:03 systemd
  4.    2 ?        00:00:00 kthreadd
  5.    3 ?        00:00:00 rcu_gp
  6.    4 ?        00:00:00 rcu_par_gp
  7.    8 ?        00:00:00 mm_percpu_wq
  8.    9 ?        00:00:00 ksoftirqd/0
  9.   10 ?        00:00:38 rcu_preempt
  10.   11 ?        00:00:00 rcu_sched
  11.   12 ?        00:00:00 rcu_bh
  12.   13 ?        00:00:00 migration/0
  13.   14 ?        00:00:00 cpuhp/0
  14.   15 ?        00:00:00 cpuhp/1
  15.   16 ?        00:00:00 migration/1
  16.   17 ?        00:00:00 ksoftirqd/1
  17.   20 ?        00:00:00 cpuhp/2
  18.   21 ?        00:00:00 migration/2
  19.   22 ?        00:00:00 ksoftirqd/2
  20.   25 ?        00:00:00 cpuhp/3
  21.   26 ?        00:00:00 migration/3
  22.   27 ?        00:00:00 ksoftirqd/3
  23.   30 ?        00:00:00 kdevtmpfs
  24.   32 ?        00:00:00 rcu_tasks_kthre
  25.   33 ?        00:00:14 kworker/0:1-events
  26.   35 ?        00:00:00 oom_reaper
  27.   36 ?        00:00:00 writeback
  28.   37 ?        00:00:00 kcompactd0
  29.   38 ?        00:00:00 ksmd
  30.   39 ?        00:00:00 crypto
  31.   40 ?        00:00:00 kblockd
  32.   41 ?        00:00:00 kconsole
  33.   42 ?        00:00:00 devfreq_wq
  34.   43 ?        00:00:00 watchdogd
  35.   45 ?        00:00:00 kworker/2:1-events
  36.   46 ?        00:00:00 cfg80211
  37.   47 ?        00:00:00 kswapd0
  38.   48 ?        00:00:00 irq/78-rockchip
  39.   49 ?        00:00:00 irq/79-rockchip
  40.   50 ?        00:00:00 irq/80-rockchip
  41.   51 ?        00:00:00 rkvdec
  42.   52 ?        00:00:00 irq/55-ffb80000
  43.   54 ?        00:00:00 iommu_wq
  44.   55 ?        00:00:00 vdpu
  45.   56 ?        00:00:00 irq/58-ffb90400
  46.   57 ?        00:00:00 vepu
  47.   58 ?        00:00:00 irq/57-ffb90000
  48.   59 ?        00:00:00 iep
  49.   60 ?        00:00:00 irq/45-ffb20000
  50.   61 ?        00:00:00 hwrng
  51.   62 ?        00:00:00 stmmac_wq
  52.   64 ?        00:00:00 irq/82-rk817
  53.   65 ?        00:00:00 ircut wq
  54.   66 ?        00:00:00 rkisp bridge wo
  55.   67 ?        00:00:00 irq/35-rockchip
  56.   68 ?        00:00:36 irq/36-rockchip
  57.   70 ?        00:00:00 mmc_complete
  58.   72 ?        00:00:00 kworker/3:1H-kblockd
  59.   74 ?        00:00:01 kworker/1:2-events
  60.   75 ?        00:00:00 krfcommd
  61.   78 ?        00:00:00 irq/108-lt7911d
  62.   79 ?        00:00:00 lt7911d_thread
  63.   80 ?        00:00:00 irq/41-rga
  64.   81 ?        00:00:00 irq/109-rockchi
  65.   82 ?        00:00:00 irq/110-rockchi
  66.   83 ?        00:00:00 rkvenc
  67.   84 ?        00:00:00 iommu_wq
  68.   85 ?        00:00:00 irq/60-ffbb0000
  69.   87 ?        00:00:00 kworker/u9:0-dhd_eventd
  70.   88 ?        00:00:00 dhd_eventd
  71.   89 ?        00:00:00 ext_eventd
  72.   90 ?        00:00:00 dhd_watchdog_th
  73.   91 ?        00:00:13 dhd_dpc
  74.   92 ?        00:00:00 dhd_rxf
  75.   97 ?        00:00:00 kworker/2:2H-kblockd
  76.   99 ?        00:00:00 jbd2/mmcblk0p4-
  77. 100 ?        00:00:00 ext4-rsv-conver
  78. 101 ?        00:00:00 kworker/2:2-events
  79. 122 ?        00:00:35 systemd-journal
  80. 132 ?        00:00:00 systemd-udevd
  81. 148 ?        00:00:00 kworker/0:2-events
  82. 158 ?        00:00:01 kworker/1:3H-kblockd
  83. 207 ?        00:00:00 ext4-rsv-conver
  84. 227 ?        00:00:03 systemd-timesyn
  85. 234 ?        00:00:00 alsactl
  86. 237 ?        00:00:13 dbus-daemon
  87. 239 ?        00:00:05 wpa_supplicant
  88. 240 ?        00:00:00 systemd-logind
  89. 241 ?        00:00:00 ModemManager
  90. 242 ?        00:00:41 NetworkManager
  91. 243 ?        00:00:00 cron
  92. 244 ?        00:00:19 rsyslogd
  93. 253 ?        00:00:00 polkitd
  94. 263 ttyFIQ0  00:00:00 agetty
  95. 273 ?        00:00:00 sshd
  96. 293 ?        00:00:00 tee-supplicant
  97. 305 ?        00:00:00 propd
  98. 312 ?        00:01:00 led_ctrl.sh
  99. 421 ?        00:00:00 kworker/3:1-events_freezable
  100. 428 ?        00:00:14 toybrick_usbd
  101. 441 ?        00:00:04 toybrick_adbd
  102. 470 ?        00:00:00 kworker/1:1H
  103. 476 ?        00:00:01 file-storage
  104. 477 ?        00:00:01 irq/81-dwc3
  105. 482 ?        00:00:00 kworker/u9:1-dhd_eventd
  106. 863 ?        00:00:07 kworker/u8:0-events_unbound
  107. 1228 ?        00:00:00 kworker/3:0-mm_percpu_wq
  108. 1970 pts/0    00:00:00 sh
  109. 1989 pts/0    00:00:00 su
  110. 2007 ?        00:00:00 systemd
  111. 2011 ?        00:00:00 (sd-pam)
  112. 2022 pts/0    00:00:00 bash
  113. 2359 ?        00:00:00 kworker/3:2-events
  114. 2688 ?        00:00:00 kworker/u8:1-flush-179:0
  115. 3259 ?        00:00:00 kworker/3:0H
  116. 3330 ?        00:00:00 kworker/1:0-events
  117. 3703 ?        00:00:00 kworker/0:0H-mmc_complete
  118. 3767 ?        00:00:00 sleep
  119. 3768 pts/0    00:00:00 ps
  120. 3845 ?        00:00:00 kworker/2:0H
  121. 3900 ?        00:00:00 kworker/u8:2-events_unbound
  122. 3935 ?        00:00:00 kworker/0:2H-mmc_complete
  123. root@debian10:/home/toybrick#
复制代码



回复

使用道具 举报

troy

版主

积分
2374
沙发
发表于 2021-10-14 16:19:45 | 只看该作者
kill 掉ispserver试试,ispserver是3A的后台守护进程,rkmedia中自己集成了3A功能,所以两者冲突了
回复

使用道具 举报

voidtikcast

新手上路

积分
42
板凳
发表于 2022-4-1 11:07:47 | 只看该作者
我也碰到同样的问题,我的ispserver mediaserver全部屏蔽了没有启动,用rkmedia 的demo测试全部都会失败,用v4l2-ctl 可以抓到帧,请问你的rkmedia问题解决了吗
回复

使用道具 举报

voidtikcast

新手上路

积分
42
地板
发表于 2022-4-7 09:26:11 | 只看该作者
voidtikcast 发表于 2022-4-1 11:07
我也碰到同样的问题,我的ispserver mediaserver全部屏蔽了没有启动,用rkmedia 的demo测试全部都会失败, ...

我的已经解决了,可以抓图,用rkmedia_vi_venc_test也可以编码h264
回复

使用道具 举报

MacbookHH

新手上路

积分
6
5#
发表于 2022-5-18 10:55:43 | 只看该作者
voidtikcast 发表于 2022-4-7 09:26
我的已经解决了,可以抓图,用rkmedia_vi_venc_test也可以编码h264

你好 請問是怎麽解決的,我同樣能抓到幀,但是實用程序時候一直提示我ispserver未開啓并且卡死,但是我使用ispserver -no-sync-db &也同樣會卡死
回复

使用道具 举报

voidtikcast

新手上路

积分
42
6#
发表于 2022-6-7 10:52:56 | 只看该作者
MacbookHH 发表于 2022-5-18 10:55
你好 請問是怎麽解決的,我同樣能抓到幀,但是實用程序時候一直提示我ispserver未開啓并且卡死,但是我使 ...

你用什么测试程序测试的,我的是sdk里面external/rkmedia/examples目录里面 自己改造了几个,另外系统自己启动的那些ispserver mediaserver 我全部禁止了,自己手动运行测试demo, 几个关键的库camera 引擎库librkaiq.so 多媒体库libeasymedia.so ,多媒体处理库librockchip_mpp.so  librockchip_vpu.so 还有v4l2相关的。
回复

使用道具 举报

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

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


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