Small local streaming project with a simple web interface.
The application allows you to:
- turn the camera on
- turn the camera off
- display an MJPEG stream in the browser
- see whether the status is
OFFLINEorLIVE
index.html: page structurestyle.css: interface stylingscript.js: front-end logic for turning the camera on and offserver.js: Node.js server and video stream handling withffmpeg
nodeffmpeg- a camera available at
/dev/video0 - a Linux environment compatible with
video4linux2
From the project folder:
node server.jsThen open in your browser:
http://localhost:8000
The server starts ffmpeg when the camera is enabled.
The stream is sent as MJPEG on the /stream route.
The front end also uses:
/statusto check the camera status/cam/onto start the camera/cam/offto stop the camera
This project is designed for local or private network use, with a simple and minimal setup.