- 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
-
复制代码
- 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
- >>>
复制代码
- 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()
复制代码
jefferyzhang 发表于 2019-11-13 08:21
1. 上位机是否转发了1808的数据包。
2. 摄像头用户名密码不要写在url地址里
3. 我们这个只是demo,无法保证 ...
hisping 发表于 2019-11-13 08:50
计算棒获取rtsp流,需要配置网络共享为桥接模式
jefferyzhang 发表于 2019-11-13 09:46
海康确实支持,我们自己试过。
计算棒肯定要插一个上位机啊,从你的描述来看,目前就是udp包无法发回给180 ...
SodrSnne 发表于 2019-11-13 09:49
是两个网必须要桥接么 我桥接时候遇到了问题
- root@192.168.1.8:~# ifconfig
- lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
- inet 127.0.0.1 netmask 255.0.0.0
- inet6 ::1 prefixlen 128 scopeid 0x10<host>
- loop txqueuelen 1 (Local Loopback)
- RX packets 31 bytes 2770 (2.7 KiB)
- RX errors 0 dropped 0 overruns 0 frame 0
- TX packets 31 bytes 2770 (2.7 KiB)
- TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
- inet 192.168.1.8 netmask 255.255.255.0 broadcast 0.0.0.0
- inet6 fe80::12dc:b6ff:fe90:1b5 prefixlen 64 scopeid 0x20<link>
- ether 10:dc:b6:90:01:b5 txqueuelen 1000 (Ethernet)
- RX packets 2765 bytes 164756 (160.8 KiB)
- RX errors 2764 dropped 4 overruns 0 frame 2764
- TX packets 2589 bytes 2827029 (2.6 MiB)
- TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- root@192.168.1.8:~#
复制代码
- 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/13 00:44:28.251] D/: mMppCtx null or no init...
- [11/13 00:44:28.252] D/: listening rtcp port 51668
- [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
- [11/13 00:44:28.254] D/: listening rtp port 51667
- ^[[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,
- [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/13 00:44:29.230] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
- ^[[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,
- [11/13 00:44:32.236] D/: [0x7f88002e50]destroying curl rtsp ...
- [11/13 00:44:32.236] D/: [0x7f88002e50]destroying curl rtsp ... done
- [11/13 00:44:32.237] D/: drm render open ...
- [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
- [11/13 00:44:39.267] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
- [11/13 00:44:39.267] D/: ReEnable rtsp client [1] rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream
- [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
- [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,
- [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.
- [11/13 00:44:42.274] D/: close curl (rtsp://admin:tensorsight666@192.168.1.64:554/h264/ch1/main/av_stream)
复制代码
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |