summaryrefslogtreecommitdiff
path: root/web/req/frame.py
diff options
context:
space:
mode:
authorRichard Knight <q@1bpm.net>2020-08-24 14:47:08 +0100
committerRichard Knight <q@1bpm.net>2020-08-24 14:47:08 +0100
commit38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30 (patch)
tree6cc0aa096ebf39bebb0e9a8eae46a10af736e457 /web/req/frame.py
downloadpeep.1bpm.net-38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30.tar.gz
peep.1bpm.net-38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30.tar.bz2
peep.1bpm.net-38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30.zip
initialHEADmaster
Diffstat (limited to 'web/req/frame.py')
-rw-r--r--web/req/frame.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/req/frame.py b/web/req/frame.py
new file mode 100644
index 0000000..7fbe5a2
--- /dev/null
+++ b/web/req/frame.py
@@ -0,0 +1,12 @@
+import cv2
+import urllib2
+
+url = "http://72.45.175.148/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000"
+src = urllib2.urlopen(url)
+if not x.info().type.startswith("image"):
+ cap = cv2.VideoCapture("http://72.45.175.148/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000")
+ ret, frame = cap.read()
+ cv2.imwrite(frame, "/usr/tmp/tst.jpg")
+
+'multipart/x-mixed-replace'
+'image/jpeg'