Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest version cannot open rtsp cameras #1085

Copy link
Copy link
Closed
@hdnh2006

Description

@hdnh2006
Issue body actions

Hello OpenCV team!

This is a very important issue to be solved.

The latest version of opencv-python is unable to open rtsp cameras. Specifically I am using the version opencv-python-4.11.0.86

With version 4.11.0.86

import cv2
cap = cv2.VideoCapture("rtsp://user:pass@my_dns_of_the_camera:port/h264/ch1/main/av_stream")
while True:
    ret, frame = cap.read()
    print(frame)

Results gotten:

[ WARN:0@30.017] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30008.638889 ms
[ WARN:0@60.065] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30036.811558 ms
None

With version 4.10.0.84 (or lower):

import cv2
cap = cv2.VideoCapture("rtsp://user:pass@my_dns_of_the_camera:port/h264/ch1/main/av_stream")
while True:
    ret, frame = cap.read()
    print(frame)

Results gotten:

[[[ 26  26  26]
  [115 115 115]
  [158 158 158]
  ...
  [156 159 155]
  [164 167 163]
  [125 128 124]]

 [[ 26  26  26]
  [115 115 115]
  [158 158 158]
  ...

Versions affected: 4.11.0.86

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.