Skip to content

Instantly share code, notes, and snippets.

@arthurbenemann
Created July 1, 2014 02:58
Show Gist options
  • Select an option

  • Save arthurbenemann/cda73c94b63f99377d1d to your computer and use it in GitHub Desktop.

Select an option

Save arthurbenemann/cda73c94b63f99377d1d to your computer and use it in GitHub Desktop.
import cv2
v = cv2.VideoCapture('http://10.5.5.9:8080/live/amba.m3u8')
# v = cv2.VideoCapture('http://10.5.5.9:8080/live/aaba.m3u8')
i = 0
while True:
v.grab()
if i > 10:
i = 0
gotNewFrame, frame = v.retrieve()
if gotNewFrame:
cv2.imshow('frame', frame)
i = i + 1
ch = 0xFF & cv2.waitKey(5)
if ch == 27:
break
cv2.destroyAllWindows()
v.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment