Access network video stream

asked 2016-03-08 09:39:38 -0500

LKM gravatar image

I have designed an algorithm to analyse streaming video from built in webcam and now I want to use the same algorithm to access network streamed video, but I don't know how to change the setting to do this.

Currently I use: video_capture = cv2.VideoCapture(0) and ret, frame = to read the video frames from the webcam. Is there a way to do this from a stream such as: rtsp:// I can access this stream in vlc.

I am using opencv3 and python 2.7.

edit retag flag offensive close merge delete


try : video_capture = cv2.VideoCapture("rtsp://")

berak gravatar imageberak ( 2016-03-09 03:59:37 -0500 )edit

Thanks for your response. Unfortunately I have already tried this, but I receive the message: Couldn't read movie file rtsp://

LKM gravatar imageLKM ( 2016-03-09 04:58:05 -0500 )edit

unfortunately, you're at the mercy of ffmpeg / gstreamer now ;(

if you're on win, make sure, cv2.pyd finds opencv_ffmpeg310.dll (or whatever your version is)

berak gravatar imageberak ( 2016-03-09 05:03:23 -0500 )edit

Will either of these work with mac?

LKM gravatar imageLKM ( 2016-03-09 05:07:23 -0500 )edit