|
想要使用获取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.
- Welcome to Smart Terminal.
- root@192.168.180.8:~# sudo dnf install librockchip_mpp-devel
- Last metadata expiration check: 0:29:47 ago on Tue 12 Nov 2019 04:41:40 AM EST.
- Package librockchip_mpp-devel-1.3.7-12.rockchip.fc28.aarch64 is already installed, skipping.
- Dependencies resolved.
- Nothing to do.
- Complete!
- root@192.168.180.8:~# python3
- Python 3.6.8 (default, Mar 21 2019, 09:31:25)
- [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
- Type "help", "copyright", "credits" or "license" for more information.
- >>>
- >>> import toybrick
- >>> import toybrick
- root@192.168.180.8:/#
- root@192.168.180.8:/ts_rpf#
- root@192.168.180.8:/#
- root@192.168.180.8:/ts_rpf# python3 1808getFrame.py
- 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.
- [11/12 05:16:42.733] D/: mMppCtx null or no init...
- [11/12 05:16:42.733] D/: listening rtcp port 40478
- [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
- [11/12 05:16:42.737] D/: listening rtp port 40477
- [11/12 05:16:42.752] D/: # FOUND[0] media: video
- [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
- [11/12 05:16:42.752] D/: # FOUND[0] rtpmap: id:96 format:H265 bitrate:90000
- [11/12 05:16:42.753] D/: # TOTAL FOUND 1
- [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
- [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
- [11/12 05:16:42.781] D/: drm render open ...
- [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
- [11/12 05:16:53.749] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
- [11/12 05:16:53.783] D/: [0x7f84002e50]destroying curl rtsp ...
- [11/12 05:16:53.783] D/: [0x7f84002e50]destroying curl rtsp ... done
- [11/12 05:16:53.784] D/: ReEnable rtsp client [1] rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream
- [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
- [11/12 05:16:53.819] D/: # FOUND[0] media: video
- [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
- [11/12 05:16:53.820] D/: # FOUND[0] rtpmap: id:96 format:H265 bitrate:90000
- [11/12 05:16:53.821] D/: # TOTAL FOUND 1
- [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
- [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
-
使用rk1808主动模式开发
已安装好toybrick mpp- root@192.168.180.8:~# sudo dnf install librockchip_mpp-devel
- Last metadata expiration check: 0:29:47 ago on Tue 12 Nov 2019 04:41:40 AM EST.
- Package librockchip_mpp-devel-1.3.7-12.rockchip.fc28.aarch64 is already installed, skipping.
- Dependencies resolved.
- Nothing to do.
- Complete!
- root@192.168.180.8:~# python3
- Python 3.6.8 (default, Mar 21 2019, 09:31:25)
- [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import toybrick
- >>>
脚本是修改了六路摄像头尝试获取rtsp视频流
1808getFrame.py
- def func_rtspdisplay(index, url, usr, pwd):
- rtsp = toy.input.createRtspClient(url, usr, pwd)
- rtsp.connect()
- last = time.time()
- while rtsp.is_opened():
- frame = rtsp.read_rgb(640, 360)
- if frame is not None:
- print(True)
- print(frame.shape)
- else:
- print(False)
- now = time.time()
- print("> [%d] got frame. use = %f s" % (index, now - last))
- last = now
- print('# End of Thread %d' % (index))
- if __name__ == '__main__':
- os.system('iptables -F') # Disable Firewall
- idx0 =0
- t0 = threading.Thread(target=func_rtspdisplay, args = (idx0, "rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream", "admin", "tensorsight666"))
- t0.start()
- t0.join()
请问如何解决这个错误,提前感谢大佬
|
|