Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

Python openCV get VideoCapture from webRTC janus

In openCV cv2.VideoCapture(), I want receive video stream from webRTC server Only Janus webRTC of node.js is available.

How can it be implemented?

question from:https://stackoverflow.com/questions/65884267/python-opencv-get-videocapture-from-webrtc-janus

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You should be able to use GStreamer for that.

cv2.VideoCapture() accepts a GStreamer pipeline, so you can use the webrtcbin and appsink plugins combined to receive a stream from any WebRTC client (including Janus).

Check out these links for guidance on how to do so:

https://answers.opencv.org/question/202017/how-to-use-gstreamer-pipeline-in-opencv/ https://gstreamer.freedesktop.org/documentation/webrtc/index.html?gi-language=python https://gstreamer.freedesktop.org/documentation/application-development/basics/init.html?gi-language=python


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...