https://github.com/speps/grumpy-pi-mjpg
Simple HTTP server to provide streams of Raspberry Pi camera using MJPEG codec
https://github.com/speps/grumpy-pi-mjpg
mjpeg raspberry-pi stream
Last synced: 8 months ago
JSON representation
Simple HTTP server to provide streams of Raspberry Pi camera using MJPEG codec
- Host: GitHub
- URL: https://github.com/speps/grumpy-pi-mjpg
- Owner: speps
- Created: 2016-09-17T07:06:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-25T07:55:24.000Z (over 9 years ago)
- Last Synced: 2025-04-19T18:30:53.500Z (about 1 year ago)
- Topics: mjpeg, raspberry-pi, stream
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 17
- Watchers: 0
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grumpy-pi-mjpg [](https://ci.appveyor.com/project/speps/grumpy-pi-mjpg)
### Simple HTTP server to provide streams of Raspberry Pi camera using MJPEG codec
This server has been designed to be the simplest possible to start streaming video
from your Raspberry Pi camera module. It uses the MJPEG codec so doesn't have sound
but supports all options of `raspivid`. The server reads the data using `stdin` which
means you need to use the `-o -` option and pipe it to the server.
The program `raspivid` can output MJPEG but it doesn't conform to what a browser
expects in a webpage. Instead, it outputs a JPEG image back to back. This is easy to
split and prepare each image to be a proper MJPEG which includes the right HTTP headers.
### How to download
Type this in your terminal :
wget https://dl.bintray.com/speps/grumpy-pi-mjpg/mjpg-server
### How to use
Type (those options are the minimum required) :
raspivid -cd MJPEG -t 0 -o - | mjpg-server
Of course, `raspivid` can take any options like so :
raspivid -cd MJPEG -w 640 -h 360 -fps 10 -t 0 -n -o - | mjpg-server
### How to compile
**NOTE**: prefer binary releases, see how to download above
You need to install Golang to compile : https://golang.org/doc/install
There are 2 options :
* Downloading the `linux-armv6l` version and following the instructions
* Download for another operating system and cross-compiling
* For this, set `GOOS=linux` and `GOARCH=arm`
Once this is done, run this :
go build grumpy-pi-mjpg/mjpg-server.go
This generates the `mjpg-server` executable.