- gst-launch-1.0 filesrc location=/home/toybrick/yolov5/test_data/20210728105542_1km.mp4 ! decodebin ! rkximagesink
复制代码
但是我使用opencv调用gstreamer时- gst='filesrc location=/home/toybrick/yolov5/test_data/20210728105542_1km.mp4 ! decodebin ! rkximagesink'
- cap = cv.VideoCapture(gst,cv.CAP_GSTREAMER)
- if not cap.isOpened():
- print("Cannot capture from camera. Exiting.")
- #os._exit()
- while(True):
- ret, frame = cap.read()
- if ret:
- cv.imshow('frame', frame)
- if cv.waitKey(1) & 0xFF == ord('q'):
- break
- cap.release()
- cv.destroyAllWindows()
复制代码
出现了以下错误:- root@debian10:/home/toybrick/yolov5# python gstreamer.py
- [ WARN:0] OpenCV | GStreamer warning: cannot find appsink in manual pipeline
- [ WARN:0] OpenCV | GStreamer warning: GStreamer: pipeline have not been created
- Cannot capture from camera. Exiting.
复制代码
按理说opencv调用gstreamer的方法和直接在shell中调用的方法应该是差不多的,为啥会出现这种错误欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |