diff options
author | Richard Knight <q@1bpm.net> | 2020-08-24 14:47:08 +0100 |
---|---|---|
committer | Richard Knight <q@1bpm.net> | 2020-08-24 14:47:08 +0100 |
commit | 38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30 (patch) | |
tree | 6cc0aa096ebf39bebb0e9a8eae46a10af736e457 /web/req/frame.py | |
download | peep.1bpm.net-38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30.tar.gz peep.1bpm.net-38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30.tar.bz2 peep.1bpm.net-38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30.zip |
Diffstat (limited to 'web/req/frame.py')
-rw-r--r-- | web/req/frame.py | 12 |
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' |