Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

RTSP communication problem

$
0
0
Hi, It is my first question in this forum, after looking for a long time any solution. I'm using python 2.7 with OPENCV '2.4.13' (I already tried with 3.1) and I can't open streams. I already solved the ffmpeg problem (dll) and tried to run the local camera and after a local video with success. could anyone help me? follow below code: PS: Windows 10, x86 rtsp link working (tried in the vlc player) ffmpeg working (tried to run a video in the code locally) import cv2, platform #import numpy as np cam = "http://192.168.11.146:81/videostream.cgi?rate=0&user=admin&pwd=888888" #cam = 0 # Use local webcam. cap = cv2.VideoCapture(cam) if not cap.isOpened(): print("not opened") while(True): # Capture frame-by-frame ret, current_frame = cap.read() if type(current_frame) == type(None): print("!!! Couldn't read frame!") break # Display the resulting frame cv2.imshow('frame',current_frame) if cv2.waitKey(1) & 0xFF == ord('q'): break # release the capture cap.release() cv2.destroyAllWindows() When I try to run I get back C:\Python27\python.exe C:/Users/brleme/PycharmProjects/opencv/main.py not opened !!! Couldn't read frame! warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:545) Process finished with exit code 0 image of the camera working in the browser ![image description](/upfiles/14792265962664474.png) kind regards, Bruno

Viewing all articles
Browse latest Browse all 19555

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>