0

我正在尝试使用此函数将我的 ip-camera 与 Python 2.7 中的 OpenCV 2.4.5 连接cap=cv2.VideoCapture("http://192.168.180.60:82/videostream.cgi?user=admin&pwd="),但它给了我这个错误:

input_bluray: (bluray_class_get_instance:1455) bluray_class_get_instance
input_bluray: (bluray_class_get_instance:1455) bluray_class_get_instance
demux_wavpack: (open_wv_file:127) open_wv_file: non-seekable inputs aren't supported yet.
(ERROR)icvOpenAVI_XINE(): Unable to open source 'http://192.168.180.60:82/videostream.cgi?user=admin&pwd='

这个论坛中,他们讨论了 icvOpenAVI_XINE 错误作为 --enable-shared 标志的 ffmpeg 问题,我这样做了很多次,但问题仍然存在

4

1 回答 1

0

我找到了避免此错误的解决方案,而无需更改 OpenCV 中的任何内容。解决方案描述如下: 1.安装vlc:sudo apt-get install vlc 2.通过命令行编写这个脚本: vlc "http://192.168.180.60:82/videostream.cgi?user=admin&pwd=" --sout "#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=rtp{sdp=rtsp://:8554/output.mpeg},dst=display}" --sout-keep http://192.168.180.60:82/videostream.cgi?user=admin&pwd=包含我的Ip-相机流式传输和 rtsp://:8554/output.mpeg 是 VLC 3 创建的输出。使用 OpenCV 使用此函数调用流式传输:cap=cv2.VideoCapture("rtsp://:8554/output.mpeg")

于 2013-06-27T18:43:17.240 回答