parent
a2252e512c
commit
d01739c5c9
@ -0,0 +1,14 @@
|
||||
import cv2
|
||||
|
||||
class CaptureVideo(object):
|
||||
def net_video(self):
|
||||
#获取网络视频
|
||||
cam = cv2.VideoCapture("rtmp://58.200.131.2:1935/livetv/cctv14")
|
||||
#cam = cv2.VideoCapture("rtmp://58.200.131.2:1935/livetv/cctv5")
|
||||
while cam.isOpened():
|
||||
success, frame = cam.read()
|
||||
cv2.imshow('Network', frame)
|
||||
cv2.waitKey(1)
|
||||
if __name__ == '__main__':
|
||||
capture_video = CaptureVideo()
|
||||
capture_video.net_video()
|
||||
Loading…
Reference in new issue