Created
September 28, 2013 20:46
-
-
Save david-batranu/6746365 to your computer and use it in GitHub Desktop.
ffmpeg streaming infra red camera from kinect
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
#grabFrame.py: | |
#!/usr/bin/env python | |
import time | |
import sys | |
import cv | |
import cv2 | |
cam = cv2.VideoCapture(-1) | |
cam.set(cv.CV_CAP_PROP_FRAME_WIDTH, 640) | |
cam.set(cv.CV_CAP_PROP_FRAME_HEIGHT, 488) | |
while True: | |
time.sleep(1.0/15.0) | |
s, imgArray = cam.read() | |
image = cv.fromarray(imgArray) | |
sys.stdout.write(image.tostring()) | |
#stream with: | |
./grabFrame.py | ffmpeg -f rawvideo -r 15 -s 640x488 -pix_fmt bgr24 -i - -f flv -r 15 -s 640x480 "rtmp://live.justin.tv/app/$(cat ~/.twitch_key)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment