Created
February 27, 2017 10:55
-
-
Save taylor224/9c1fa1131752712e90213baf0f5f5c48 to your computer and use it in GitHub Desktop.
ffmpeg stream to UStream with python
This file contains hidden or 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
command = "ffmpeg -f avfoundation -i \":0\" -f rawvideo -pix_fmt bgr24 -s 1280x720 -i - -deinterlace -vb 2000k -vcodec libx264 -preset ultrafast -g 60 -threads 4 -acodec libmp3lame -ab 128k -ar 22050 -bufsize 512k -f flv \"rtmp://1.1234567.fme.ustream.tv/ustreamVideo/id/streamkey\" | |
videopipe = subprocess.Popen(pipecommand, shell=True, stdin=subprocess.PIPE) | |
videopipe.stdin.write(frame.tostring()) # OpenCV Frame Data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment