Skip to content

Instantly share code, notes, and snippets.

View msrlab's full-sized avatar

Martin Schulte-Rüther msrlab

  • University Medical Center Göttingen
  • Göttingen, Germany
View GitHub Profile
#!/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
#!/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