Ask Your Question

Revision history [back]

/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:901

Hi,

I want show ipcamear stream using opencv 4 & python 3.7 .but i am getting the below error.

arning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:901) warning: rtsp://ipaddress/Streaming/Channels/1 (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:902) Traceback (most recent call last):

Code :

import the necessary packages

from imutils.video import VideoStream import numpy as npq import argparse import imutils import time import cv2 import os

print("[INFO] starting video stream...") vs = cv2.VideoCapture("rtsp://ipcamera/Streaming/Channels/1")

loop over the frames from the video stream

count =0.0 while True: # print(count) count += 1 ret, frame = vs.read()
frame = imutils.resize(frame,width=740) cv2.startWindowThread() cv2.imshow('Stream IP Camera OpenCV',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break

vs.release() cv2.destroyAllWindows()

click to hide/show revision 2
None

updated 2020-05-05 02:30:54 -0600

berak gravatar image

/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:901

Hi,

I want show ipcamear stream using opencv 4 & python 3.7 .but i am getting the below error.

arning:

warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:901)
warning: rtsp://ipaddress/Streaming/Channels/1 (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:902)
Traceback (most recent call last):

last):

Code :

# import the necessary packages

packages from imutils.video import VideoStream import numpy as npq import argparse import imutils import time import cv2 import os

os

print("[INFO] starting video stream...") vs = cv2.VideoCapture("rtsp://ipcamera/Streaming/Channels/1")

cv2.VideoCapture("rtsp://ipcamera/Streaming/Channels/1")

# loop over the frames from the video stream

stream count =0.0 while True: # print(count) count += 1 ret, frame = vs.read()
frame = imutils.resize(frame,width=740) cv2.startWindowThread() cv2.imshow('Stream IP Camera OpenCV',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break

break

vs.release() cv2.destroyAllWindows()

cv2.destroyAllWindows()