OpenCV IP摄像机RTSP流 [英] OpenCV IP Camera RTSP stream
问题描述
我正在尝试使用OpenCV和Java从IP摄像机访问RTSP视频流.我可以使用具有以下格式的VLC播放器访问该流:rtsp://192.168.1.10:554/rtsp_live0
,但是当我尝试使用OpenCV时,视频流似乎总是关闭.
I'm trying to access a RTSP video stream from an IP camera using OpenCV and Java. I can access the stream using VLC player with the following format: rtsp://192.168.1.10:554/rtsp_live0
but when I try to use OpenCV the video stream seems to always be closed.
我正在使用的代码...(简体)
The code I'm using... (simplified)
VideoCapture capture = new VideoCapture();
capture.open("rtsp://192.168.1.10:554/rtsp_live0");
while(!capture.isOpened())
System.out.print("Not opened :( \r");
我有一个Mustcam H806P,并从以下网站找到了流URI: http://www.ispyconnect.com/man.aspx?n=ipcamera
I have a Mustcam H806P and found the stream URI from this website: http://www.ispyconnect.com/man.aspx?n=ipcamera
我在做什么错了?
推荐答案
I'm reporting Alexander Smorkalov answer on answers.opencv.org
OpenCV使用ffmpeg库进行视频I/O.尝试使用控制台ffmpeg工具获取视频流.地址必须相同.
OpenCV uses ffmpeg library for video I/O. Try to get video stream with console ffmpeg tool. The address must be the same.
另请参见 OpenCV-如何捕获rtsp视频流
这篇关于OpenCV IP摄像机RTSP流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!