使用vlc python绑定从摄像机捕获RTSP帧?

时间:2018-09-16 09:37:38

标签: python vlc rtsp

首先,让我向您展示代码:

import vlc
player = vlc.MediaPlayer('rtsp://admin:admin@IP:554/cam/realmonitor? 
channel=1&subtype=1')
player.play()
if(player.video_take_snapshot(0, imgname, 0, 0)) == 0
   im = cv2.imread(imgname)

....

但是出现错误:

live555 demux error : Nothing to play for rtsp://admin:admin@IP:554/cam/realmonitor?channel=1&subtype=1'

main access error:cannot resolve admin port 0:name or service not known
access_realrtsp access error:cannot to connect to admin:0

main access error:connection failed

main access error : VLC could not connect to 'admin:0'

main input error:open of 'rtsp://admin:admin@IP:554/cam/realmonitor?channel=1&subtype=1' failed

main input error : your input cannot be opened

main input error: vlc is unable to open the mrl 'rtsp://admin:admin@IP:554/cam/realmonitor?channel=1&subtype=1'

但是我们使用ping命令测试Internet连接,它表明连接正常,我们尝试使用:curl IP:554连接554端口(554是服务器的rtsp控制端口相机),则显示错误:curl:(52) Empty reply from server 最有趣的是,三天前,相同的代码可以正常工作,我们该怎么办? 谢谢!!

0 个答案:

没有答案