gocv icon indicating copy to clipboard operation
gocv copied to clipboard

win10 cannot read rtsp

Open TangShuancheng opened this issue 3 years ago • 11 comments

Unable to read rtsp on win10 environment。

Current environment: gocv version: 0.23.0 opencv lib version: 4.3.0 image

The current rtsp stream can be opened using VLC,can't open through OpenVideoCapture。 Code show as below: image

Error message: Error opening capture device: Error opening file

TangShuancheng avatar Jul 11 '20 09:07 TangShuancheng

Try using VideoCaptureFile directly instead of OpenVideoCapture

golubaca avatar Jul 11 '20 09:07 golubaca

Also, your password contains @ character. In url string,@ is delimiter which separates auth information and url. It can throw an error sometimes if url is not parsed correctly.

golubaca avatar Jul 11 '20 09:07 golubaca

@golubaca Both VideoCaptureFile and OpenVideoCapture have been tried, both have the same problem. In addition, I don't use rtsp url here, directly using local MP4 or avi is the same error message, but this program is passed under macOS.

TangShuancheng avatar Jul 11 '20 10:07 TangShuancheng

Hmm, I can't reproduce this error. Only time I got this error is when url to the file is wrong.

golubaca avatar Jul 11 '20 10:07 golubaca

@golubaca You can look at the storage path of my current resources and the path written in the program. Is there anything you should pay attention to?Are there any special requirements on win10? image

TangShuancheng avatar Jul 11 '20 10:07 TangShuancheng

I got the video successfully by VideoCapture Need to load opencv_videoio_ffmpeg450_64.dll image

zxysilent avatar Nov 28 '20 02:11 zxysilent

I come across the same problem as yours,the problem is: Error opening video capture device: rtsp://admin:[email protected] My computer system is win7 How did you solve this problem? @deadprogram @golubaca @TangShuancheng @zxysilent @drnic

GlennZeng avatar Jun 21 '21 10:06 GlennZeng

Is the url provided your url from code? If so, this is probably not full path to rtsp stream.

golubaca avatar Jun 21 '21 10:06 golubaca

Need to load opencv_videoio_ffmpeg450_64.dll

zxysilent avatar Jun 21 '21 11:06 zxysilent

@golubaca您可以查看我当前资源的存储路径和程序中编写的路径。有什么需要注意的吗?对win10有什么特殊要求吗? 图像

anything

I also encountered the same problem, when I thought it should be opencv problem, it should be that the corresponding parsing library was not loaded, I was trying to load opencv_videoio_ffmpeg.dll

entrehuihui avatar Dec 13 '22 03:12 entrehuihui

opencv_videoio_ffmpeg450_64.dll

https://raw.githubusercontent.com/opencv/opencv_3rdparty/65ec04d4573dcdfa4531f0b9e67f35d8ffff873e/ffmpeg/opencv_videoio_ffmpeg_64.dll https://raw.githubusercontent.com/opencv/opencv_3rdparty/65ec04d4573dcdfa4531f0b9e67f35d8ffff873e/ffmpeg/opencv_videoio_ffmpeg.dll Download these two files and put them in your working directory。Then change the name to your opencv version, for example: opencv4.6 X64 = opencv_videoio_ffmpeg460_64.dll

entrehuihui avatar Dec 13 '22 03:12 entrehuihui