Created
September 13, 2014 23:27
-
-
Save benoxoft/2ff18d8fead052a217ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import cv2.cv as cv | |
import sys | |
#python capture.py | ffmpeg -f rawvideo -pix_fmt rgb24 -s 320x240 -r 30 -i - -an -f mpeg1video -b 800k -r 30 http://127.0.0.1:8082/patate/320/240 | |
video = cv2.VideoCapture(0) | |
def pipe_images(): | |
run, img = video.read() | |
img = cv2.resize(img, (320,240)) | |
img = cv2.cvtColor(img, cv.CV_BGR2RGB) | |
sys.stdout.write(img.data) | |
if __name__ == '__main__': | |
while True: | |
pipe_images() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment