Skip to content

Instantly share code, notes, and snippets.

View djosix's full-sized avatar
🐄
Coworking

Yuan-Kui Lee djosix

🐄
Coworking
View GitHub Profile
@endolith
endolith / readme.md
Last active August 31, 2025 14:26
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method