Modules for Raspberry Pi
Setting up the Pi
Tested with Raspberry Pi 3 Model B
sudo raspi-config
- change user password
- set Hostname (Network Options)
- connect to WiFi (Network Options)
- enable camera (Interfacing Options)
- set Memory Split to 16 MB (Advanced Options)
- reboot
- Clone this repository
git clone https://github.com/attackle/nomad-rpi.git
cd nomad-rpi
- Install requirements
pip3 install -r requirements.txt
- Install dependencies
sudo apt install vlc libav-tools
- Create script to livestream:
cd ~
echo "raspivid -t 0 -vf -hf -w 640 -h 480 -fps 15 -b 1000000 -o - | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264" > stream.sh
chmod a+x stream.sh
-t 0
: no timeout (stream indefinitely)-vf
: vertical flip (flip video vertically)-hf1
: horizontal flip (flip video horizontally)-w 640 -h 480
: video size 640x480 px-fps 15
: frames per second-b 1000000
: bit rate-o -
: output to STDINaccess=http
: livestream can be accessed via HTTPdst=:8090
: destination is localhost port 8090
Running unittests on the module
python3 -m unitest discover -v
bash ~/nomad-rpi/start.sh