how to process with opencv and python a live video transmission from a webrtc site

asked 2020-05-29 11:53:46 -0600

Pretto gravatar image

I'm trying to process with OpenCV and python a live video transmission from a WebRTC site: https://webrtc-streamer.herokuapp.com... But I can't open the video with cv2.videocapture (URL).

How could I open the video that is compatible with OpenCV? I appreciate it if you demonstrate the code.

edit retag flag offensive close merge delete

Comments

you probably need to show us, how you stream it, and your attempt at the side, receiving it

berak gravatar imageberak ( 2020-05-30 02:01:12 -0600 )edit

it's likely, you're doomed, since neither ffmpeg nor gstreamer can handle webrtc connections

berak gravatar imageberak ( 2020-05-30 02:08:46 -0600 )edit

@Pretto. I can see live on website. Can you post code, so I can do on my newest raspberry pi 4B with 8GB ram.

supra56 gravatar imagesupra56 ( 2020-05-30 07:39:59 -0600 )edit
1

@supra56

I can see live on website

means: using a browser, not VideoCapture, right ?

berak gravatar imageberak ( 2020-05-30 07:49:02 -0600 )edit

That right. But I know that he wanted to do in OpenCV.. Unfortunately, I'm not doing on my machine.

supra56 gravatar imagesupra56 ( 2020-05-30 07:53:44 -0600 )edit

@berak. Never mind. I do it myself. I will use both picamera and usb webcam.

supra56 gravatar imagesupra56 ( 2020-05-30 08:15:46 -0600 )edit