No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

page title tags date
RTSP Raspberry Pi Camera
raspberry pi stream rtsp


Builds the absolutely wonderful v4l2rtspserver project ( for the Raspberry PI.

The build is fully self-contained in a docker environment and the resulting binary pulled out for use on the host.


Install Docker as described here:

curl -sSL | sh


Run ./

Statically compiled binary will appear in the ./bin folder


Enable module to create the /dev/video0 device for the camera

modprobe bcm2835-v4l2
echo bcm2835-v4l2 >> /etc/modules

ALSA device ID

Check arecord -L to see device ID for alsa device. In my case it's hw:1

My device requires channel count 1 -C 1. It was pretty clear in the logs when that wasn't set

Run Manually

/opt/rtsp-raspi/bin/v4l2rtspserver -C 1 /dev/video0,hw:1

Run as Service

Create /opt/

Customize args for v4l2rtspserver as appropriate. -C 1 sets audio device to 1 channel which is required for my specific mic. Username and password should probably be set as well.

exec /opt/rtsp-raspi/bin/v4l2rtspserver -C 1 /dev/video0,hw:1

Create /etc/systemd/system/stream.service

Description=RTSP Camera Service



Load the SystemD module

sudo systemctl enable stream
sudo systemctl daemon-reload
sudo systemctl start stream
sudo systemctl status stream

Check logs with

sudo journalctl -u stream

Test Client

Connect to the stream on another machine with ffplay:

ffplay -sync ext -fflags nobuffer -framedrop rtsp://


See STLs for a case mounting option