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
| #!/usr/bin/python | |
| ''' | |
| Author: Igor Maculan - [email protected] | |
| A Simple mjpg stream http server | |
| ''' | |
| import cv2 | |
| import Image | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| import StringIO | |
| import time |
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
| #!/usr/bin/python | |
| #based on the ideas from http://synack.me/blog/implementing-http-live-streaming | |
| # Run this script and then launch the following pipeline: | |
| # gst-launch videotestsrc pattern=ball ! video/x-raw-rgb, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! tcpclientsink port=9999 | |
| from Queue import Queue | |
| from threading import Thread | |
| from socket import socket | |
| from select import select | |
| from wsgiref.simple_server import WSGIServer, make_server, WSGIRequestHandler |