Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
#-*- coding:utf-8 -*-
##############################################################
# Lempel-Ziv-Stac decompression
# BitReader and RingList classes
#
# Copyright (C) 2011 Filippo Valsorda - FiloSottile
# filosottile.wiki gmail.com - www.pytux.it
#
@volodymyrsmirnov
volodymyrsmirnov / pysurcamui.py
Created July 11, 2012 10:38
Python surveillance ip camera viewer and alert (tested on Foscam cameras)
#!/usr/bin/env python
import gtk, threading, datetime, urllib2, json
import Image, ImageChops, ImageStat, StringIO
CONFIG_FILE = "config.json"
# config sample
#{
# "sensivity": 10,
@misaelnieto
misaelnieto / live-mjpeg-stream.py
Last active September 1, 2024 11:13
Streaming MJPEG over HTTP with gstreamr and python - WSGI version
#!/usr/bin/python
#based on the ideas from http://synack.me/blog/implementing-http-live-streaming
# Updates:
# - 2024-04-24: Apply suggestions from @Pin80
# 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
#updated command line
#gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! video/x-raw, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! #tcpclientsink port=9999
from multiprocessing import Queue