Skip to content

Creating a network camera with a Raspberry Pi and Raspberry Pi camera module

Notifications You must be signed in to change notification settings

thenamesjagger/Raspberry-Pi-Security-Camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Raspberry-Pi-Security-Camera

Creating a network camera with a Raspberry Pi and Raspberry Pi camera module. Tested with Raspberry Pi Zero 2w and Camera Module 3 but wull likely work with most Raspberry Pi's. Stream can be accessed via VLC on another machine or Home Assistant.

Documentation

Install and Set Up

VLC

sudo apt upgrade && sudo apt update
sudo apt install vlc

Stream via http

libcamera-vid -t 0 --framerate 30 --inline -o - | cvlc stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264

To run on boot

sudo nano /etc/systemd/system/stream.service
[Unit]
Description=Stream service
After=network.target

[Service]
User=username
ExecStart=/bin/bash -c "libcamera-vid -t 0 --framerate 15 --inline -o - | cvlc stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264"
Restart=always

[Install]
WantedBy=multi-user.target
sudo systemctl enable stream.service
sudo systemctl start stream.service

To access on VLC go to file, network stream, then enter http://<ip-of-rpi>:8090

Generic Camera Integration in Home Assistant

image

About

Creating a network camera with a Raspberry Pi and Raspberry Pi camera module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published