|
我这边python3安装了 toybrick-0.3.0-py3-one-any.whl 和 python3-toybrick-0.2-12.aarch64.rpm
运行示例的python程序出现了以下错误 请问如何解决 @jefferyzhang
系统版本为 federa 28 开发板为TB-RK3399ProDs
我这边是想在开发板上调用rtsp摄像头做人工智能识别,但是采用opencv解码时十分卡顿 所以来论坛看一下rtsp的解码
报错信息如下
- Traceback (most recent call last):
- File "demo_multi_gldisplay.py", line 3, in <module>
- import toybrick as toy
- File "/usr/local/lib/python3.6/site-packages/toybrick/__init__.py", line 26, in <module>
- from toybrick.rtsp import RtspClient
- File "/usr/local/lib/python3.6/site-packages/toybrick/rtsp.py", line 1, in <module>
- from . import rkrtspclient
- ImportError: /usr/local/lib/python3.6/site-packages/toybrick/rkrtspclient.so: undefined symbol: eglGetPlatformDisplayEXT
修改调用的示例demo如下#!/usr/bin/env python3.6
import os
import toybrick as toy
import time
import threading
def func_rtspdisplay(gl, index, url):
rtsp = toy.input.createRtspClient(url)
rtsp.connect()
last = time.time()
while rtsp.is_opened():
frame = rtsp.read_rgb(640, 360)
now = time.time()
gl.show(index, frame)
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
gl = toy.output.createGLDrmDisplay(toy.DisplayPort.HDMI_A)
idx0 = gl.add_view(0, 180, 640, 360)
idx1 = gl.add_view(640, 180, 640, 360)
idx2 = gl.add_view(1280, 180, 640, 360)
idx3 = gl.add_view(0, 540, 640, 360)
idx4 = gl.add_view(640, 540, 640, 360)
idx5 = gl.add_view(1280, 540, 640, 360)
t0 = threading.Thread(target=func_rtspdisplay, args = (gl, idx0, "rtsp://admin:wz123456@192.168.0.174:554/Streaming/Channels/101"))
# t1 = threading.Thread(target=func_rtspdisplay, args = (gl, idx1, "rtsp://192.168.169.16/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
# t2 = threading.Thread(target=func_rtspdisplay, args = (gl, idx2, "rtsp://192.168.169.13/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
# t3 = threading.Thread(target=func_rtspdisplay, args = (gl, idx3, "rtsp://192.168.169.16/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
# t4 = threading.Thread(target=func_rtspdisplay, args = (gl, idx4, "rtsp://192.168.169.13/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
# t5 = threading.Thread(target=func_rtspdisplay, args = (gl, idx5, "rtsp://192.168.169.16/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
t0.start()
# t1.start()
# t2.start()
# t3.start()
# t4.start()
# t5.start()
t0.join()
# t1.join()
# t2.join()
# t3.join()
# t4.join()
# t5.join()
|
|