Reputation: 1
I'm experiencing an issue with cv2.VideoCapture(video_url)
when trying to work with video links. The function doesn't seem to handle video URLs properly, although it works without any issues for local MP4 files. Below are the details of my setup:
Interestingly, when I previously used Ubuntu 24.04, the issue didn't seem to occur (although I'm not entirely sure if it's related).
Issue:
The program fails to open the video link and returns an error message:
Error: Unable to open video stream.
Error: Cannot read frame from video stream.
Questions:
I tried switching between virtual environments using Conda and venv
. When I replaced the video URL with a local MP4 file, it worked. I also reinstalled ultralytics
and torch
.
I don't know if GStreamer is not installed with OpenCV when using pip on Ubuntu 22.04.
Upvotes: -1
Views: 27