Skip to content
Branch: master
Find file History
#221 Compare This branch is 177 commits ahead, 2 commits behind codewithpassion:master.
Type Name Latest commit message Commit time
Failed to load latest commit information.
CMakeLists.txt Migrate build system to cmake Feb 28, 2016 Added DRC and Stats options to RaspiCam input plugin (#27) Aug 4, 2016
RaspiCamControl.c Added DRC and Stats options to RaspiCam input plugin (#27) Aug 4, 2016
RaspiCamControl.h Added DRC and Stats options to RaspiCam input plugin (#27) Aug 4, 2016
input_raspicam.c Fix Raspicam cfx read incorrectly. Fixes #98 Jan 25, 2018

mjpg-streamer input plugin: input_raspicam

MJPEG Streamer with raspicam input plugin (based on raspistill mmal source code)

Discussion / Questions / Help

Probably best in this thread


If you ran the basic build, you can run from the mjpeg streamer experimental folder with:

./mjpg_streamer -o " -w ./www" -i ""

You can specify options, like in raspivid:

./mjpg_streamer -o " -w ./www" -i " -x 1280 -y 720 -fps 15 -ex night"

It does support upto 1080p 30fps, but the bandwidth produced would be more than the usb bus (and therefore ethernet port / wifi dongle) can provide. 720p 15fps is a good compromise.

Here's some help for this input plugin:

 Help for input plugin..: raspicam input plugin
 The following parameters can be passed to this plugin:

 [-fps | --framerate]...: set video framerate, default 5 frame/sec
 [-x | --width ]........: width of frame capture, default 640
 [-y | --height]........: height of frame capture, default 480
 [-quality].............: set JPEG quality 0-100, default 85
 [-usestills]...........: uses stills mode instead of video mode
 [-preview].............: enable full screen preview
 -sh : Set image sharpness (-100 to 100)
 -co : Set image contrast (-100 to 100)
 -br : Set image brightness (0 to 100)
 -sa : Set image saturation (-100 to 100)
 -ISO : Set capture ISO
 -vs : Turn on video stabilisation
 -ev : Set EV compensation
 -ex : Set exposure mode (see raspistill notes)
 -awb : Set AWB mode (see raspistill notes)
 -ifx : Set image effect (see raspistill notes)
 -cfx : Set colour effect (U:V)
 -mm : Set metering mode (see raspistill notes)
 -rot : Set image rotation (0-359)
-stats : Compute image stats for each picture (reduces noise)
 -drc : Dynamic range compensation level (see raspistill notes)
 -hf : Set horizontal flip
 -vf : Set vertical flip

Some of the camera options like ISO may not work due to it not working in the mmal-libs.

Video mode is the default as it allows much smoother video (higher framerates). Stills mode allows you to use the full-frame of the sensor, but has a max framerate of around 8fps, probably less. Use stills mode with low FPS (e.g. 1 or 2).

In order to have preview output shown on the raspi screen add the -preview option.

This should run indefinitely. ctrl-c closes mjpeg streamer and raspicam gracefully.

Based on modified mmal header and source files from

You can’t perform that action at this time.