Skip to content

a-rrivederci/nomad-rpi

Repository files navigation

NOMAD Pi

Modules for Raspberry Pi

Index

  1. Setup
  2. Testing
  3. Execution

 

Setup

Setting up the Pi

Tested with Raspberry Pi 3 Model B

  1. 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
  2. Clone this repository
git clone https://github.com/attackle/nomad-rpi.git
cd nomad-rpi
  1. Install requirements
pip3 install -r requirements.txt
  1. Install dependencies
sudo apt install vlc libav-tools
  1. 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 STDIN
  • access=http: livestream can be accessed via HTTP
  • dst=:8090: destination is localhost port 8090

 

Testing

Running unittests on the module

python3 -m unitest discover -v

 

Execution

bash ~/nomad-rpi/start.sh 

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •