Toybrick

rk1808计算棒主动开发报内核错误

SodrSnne

中级会员

积分
249
楼主
发表于 2019-11-12 18:18:35    查看: 8286|回复: 7 | [复制链接]    打印 | 只看该作者
想要使用获取rtsp的简单脚本报了一个内核错误 然后rtsp代码无限循环
错误如下:
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.4.167
iptables v1.6.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.


  1. Welcome to Smart Terminal.
  2. root@192.168.180.8:~# sudo dnf install librockchip_mpp-devel
  3. Last metadata expiration check: 0:29:47 ago on Tue 12 Nov 2019 04:41:40 AM EST.
  4. Package librockchip_mpp-devel-1.3.7-12.rockchip.fc28.aarch64 is already installed, skipping.
  5. Dependencies resolved.
  6. Nothing to do.
  7. Complete!
  8. root@192.168.180.8:~# python3
  9. Python 3.6.8 (default, Mar 21 2019, 09:31:25)
  10. [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
  11. Type "help", "copyright", "credits" or "license" for more information.
  12. >>>
  13. >>> import toybrick
  14. >>> import toybrick
  15. root@192.168.180.8:/#
  16. root@192.168.180.8:/ts_rpf#
  17. root@192.168.180.8:/#
  18. root@192.168.180.8:/ts_rpf# python3 1808getFrame.py
  19. modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.4.167
  20. iptables v1.6.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
  21. Perhaps iptables or your kernel needs to be upgraded.
  22. [11/12 05:16:42.733] D/:  mMppCtx null or no init...
  23. [11/12 05:16:42.733] D/: listening rtcp port 40478
  24. [11/12 05:16:42.735] D/: curlto rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream , cli 40477:40487, tcp: 0
  25. [11/12 05:16:42.737] D/: listening rtp port 40477
  26. [11/12 05:16:42.752] D/: # FOUND[0] media: video
  27. [11/12 05:16:42.752] D/: # FOUND[0] control: rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream/trackID=1
  28. [11/12 05:16:42.752] D/: # FOUND[0] rtpmap: id:96 format:H265 bitrate:90000
  29. [11/12 05:16:42.753] D/: # TOTAL FOUND  1
  30. [11/12 05:16:42.753] D/: TRACK [0] : rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream/trackID=1 , format=2
  31. [11/12 05:16:42.753] D/: setup 40477 , 40478, uri: rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream/trackID=1
  32. [11/12 05:16:42.781] D/: drm render open ...
  33. [11/12 05:16:53.749] W/: (threadRtpFunc in unit_rtsp_client.cpp:135): UDP-RTP receive timeout. rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream ; type = Video
  34. [11/12 05:16:53.749] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
  35. [11/12 05:16:53.783] D/: [0x7f84002e50]destroying curl rtsp ...
  36. [11/12 05:16:53.783] D/: [0x7f84002e50]destroying curl rtsp ... done
  37. [11/12 05:16:53.784] D/: ReEnable rtsp client [1] rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream
  38. [11/12 05:16:53.784] D/: curlto rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream , cli 40477:40487, tcp: 0
  39. [11/12 05:16:53.819] D/: # FOUND[0] media: video
  40. [11/12 05:16:53.820] D/: # FOUND[0] control: rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream/trackID=1
  41. [11/12 05:16:53.820] D/: # FOUND[0] rtpmap: id:96 format:H265 bitrate:90000
  42. [11/12 05:16:53.821] D/: # TOTAL FOUND  1
  43. [11/12 05:16:53.821] D/: TRACK [0] : rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream/trackID=1 , format=2
  44. [11/12 05:16:53.821] D/: setup 40477 , 40478, uri: rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream/trackID=1
  45.             
复制代码


使用rk1808主动模式开发
已安装好toybrick mpp
  1. root@192.168.180.8:~# sudo dnf install librockchip_mpp-devel
  2. Last metadata expiration check: 0:29:47 ago on Tue 12 Nov 2019 04:41:40 AM EST.
  3. Package librockchip_mpp-devel-1.3.7-12.rockchip.fc28.aarch64 is already installed, skipping.
  4. Dependencies resolved.
  5. Nothing to do.
  6. Complete!
  7. root@192.168.180.8:~# python3
  8. Python 3.6.8 (default, Mar 21 2019, 09:31:25)
  9. [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
  10. Type "help", "copyright", "credits" or "license" for more information.
  11. >>> import toybrick
  12. >>>
复制代码



脚本是修改了六路摄像头尝试获取rtsp视频流
1808getFrame.py
  1. def func_rtspdisplay(index, url, usr, pwd):
  2.     rtsp = toy.input.createRtspClient(url, usr, pwd)
  3.     rtsp.connect()
  4.     last = time.time()
  5.     while rtsp.is_opened():
  6.         frame = rtsp.read_rgb(640, 360)
  7.         if frame is not None:
  8.             print(True)
  9.             print(frame.shape)
  10.         else:
  11.             print(False)
  12.         now = time.time()
  13.         print("> [%d] got frame. use = %f s" % (index, now - last))
  14.         last = now
  15.     print('# End of Thread %d' % (index))
  16. if __name__ == '__main__':
  17.     os.system('iptables -F')  # Disable Firewall
  18.     idx0 =0
  19.     t0 = threading.Thread(target=func_rtspdisplay, args = (idx0, "rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream", "admin", "tensorsight666"))
  20.     t0.start()
  21.     t0.join()
复制代码



请问如何解决这个错误,提前感谢大佬


回复

使用道具 举报

jefferyzhang

版主

积分
13340
沙发
发表于 2019-11-13 08:21:10 | 只看该作者
1. 上位机是否转发了1808的数据包。
2. 摄像头用户名密码不要写在url地址里
3. 我们这个只是demo,无法保证能兼容所有摄像头
回复

使用道具 举报

SodrSnne

中级会员

积分
249
板凳
 楼主| 发表于 2019-11-13 09:37:22 | 只看该作者
jefferyzhang 发表于 2019-11-13 08:21
1. 上位机是否转发了1808的数据包。
2. 摄像头用户名密码不要写在url地址里
3. 我们这个只是demo,无法保证 ...

1.是参考6路摄像头解码rtsp视频流的demo 把3399板子换成1808计算棒 获取一路摄像头解码 没有上位机
2.同样的配置在rk3399上面解码6路已经成功
3.摄像头是海康威视的网络摄像头
回复

使用道具 举报

jefferyzhang

版主

积分
13340
地板
发表于 2019-11-13 09:46:19 | 只看该作者
海康确实支持,我们自己试过。
计算棒肯定要插一个上位机啊,从你的描述来看,目前就是udp包无法发回给1808而已。
你现在情况就是计算棒能单向连接摄像头,而摄像头数据包无法回到计算棒。

回复

使用道具 举报

SodrSnne

中级会员

积分
249
5#
 楼主| 发表于 2019-11-13 09:47:30 | 只看该作者
hisping 发表于 2019-11-13 08:50
计算棒获取rtsp流,需要配置网络共享为桥接模式

我按照操作步骤设置了网络共享 后续桥接操作遇到了问题
这个该怎么办

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

SodrSnne

中级会员

积分
249
6#
 楼主| 发表于 2019-11-13 09:49:06 | 只看该作者
jefferyzhang 发表于 2019-11-13 09:46
海康确实支持,我们自己试过。
计算棒肯定要插一个上位机啊,从你的描述来看,目前就是udp包无法发回给180 ...

是两个网必须要桥接么 我桥接时候遇到了问题
回复

使用道具 举报

jefferyzhang

版主

积分
13340
7#
发表于 2019-11-13 11:32:08 | 只看该作者
SodrSnne 发表于 2019-11-13 09:49
是两个网必须要桥接么 我桥接时候遇到了问题

很多方法啊,桥接当然是最简单的,这样1808能获取和摄像头同一个网段的IP,就可以互通。
也可以NAT,UPNP之类的映射和端口转发方式。这个你自己百度研究下吧。
回复

使用道具 举报

SodrSnne

中级会员

积分
249
8#
 楼主| 发表于 2019-11-13 13:45:24 | 只看该作者
设置了1808与摄像头在一个网段 还是timeout
  1. root@192.168.1.8:~# ifconfig
  2. lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
  3.         inet 127.0.0.1  netmask 255.0.0.0
  4.         inet6 ::1  prefixlen 128  scopeid 0x10<host>
  5.         loop  txqueuelen 1  (Local Loopback)
  6.         RX packets 31  bytes 2770 (2.7 KiB)
  7.         RX errors 0  dropped 0  overruns 0  frame 0
  8.         TX packets 31  bytes 2770 (2.7 KiB)
  9.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

  10. usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
  11.         inet 192.168.1.8  netmask 255.255.255.0  broadcast 0.0.0.0
  12.         inet6 fe80::12dc:b6ff:fe90:1b5  prefixlen 64  scopeid 0x20<link>
  13.         ether 10:dc:b6:90:01:b5  txqueuelen 1000  (Ethernet)
  14.         RX packets 2765  bytes 164756 (160.8 KiB)
  15.         RX errors 2764  dropped 4  overruns 0  frame 2764
  16.         TX packets 2589  bytes 2827029 (2.6 MiB)
  17.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

  18. root@192.168.1.8:~#
复制代码


报错代码
  1. python3 1808getFrame.py
  2. modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.4.167
  3. iptables v1.6.2: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
  4. Perhaps iptables or your kernel needs to be upgraded.
  5. [11/13 00:44:28.251] D/:  mMppCtx null or no init...
  6. [11/13 00:44:28.252] D/: listening rtcp port 51668
  7. [11/13 00:44:28.253] D/: curlto rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream , cli 51667:51677, tcp: 0
  8. [11/13 00:44:28.254] D/: listening rtp port 51667
  9. ^[[B[11/13 00:44:29.230] E/: (checkRet in curl_rtsp.cpp:325): [options:138] check error(7)! rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream,
  10. [11/13 00:44:29.230] E/: (startRtsp in unit_rtsp_client.cpp:332): rtsp client connect rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream failed.
  11. [11/13 00:44:29.230] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
  12. ^[[B^[[B[11/13 00:44:32.236] E/: (checkRet in curl_rtsp.cpp:325): [teardown:221] check error(7)! rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream,
  13. [11/13 00:44:32.236] D/: [0x7f88002e50]destroying curl rtsp ...
  14. [11/13 00:44:32.236] D/: [0x7f88002e50]destroying curl rtsp ... done
  15. [11/13 00:44:32.237] D/: drm render open ...
  16. [11/13 00:44:39.267] W/: (threadRtpFunc in unit_rtsp_client.cpp:135): UDP-RTP receive timeout. rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream ; type = Video
  17. [11/13 00:44:39.267] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
  18. [11/13 00:44:39.267] D/: ReEnable rtsp client [1] rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream
  19. [11/13 00:44:39.267] D/: curlto rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream , cli 51667:51677, tcp: 0
  20. [11/13 00:44:42.274] E/: (checkRet in curl_rtsp.cpp:325): [options:138] check error(7)! rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream,
  21. [11/13 00:44:42.274] E/: (startRtsp in unit_rtsp_client.cpp:332): rtsp client connect rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream failed.
  22. [11/13 00:44:42.274] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

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

本版积分规则

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


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