• 1
    Setup Raspbery Pi Zero W

    Install Raspbian from https://www.raspberrypi.org/downloads/raspbian/ following the instructions from https://www.raspberrypi.org/documentation/installation/installing-images/README.md

    Install all updates by running the following two commands from a terminal:

    sudo apt-get update; sudo apt-get dist-upgrade

    Shut down, connect the camera. Start the raspberry again. In the Raspberry Setup panel enable the camera and enable SSH access to the raspberry. The sainsmart camera works as the official Pi camera, you can follow the instructions found here: https://www.raspberrypi.org/learning/addons-guide/picamera/

    Unfortunately you are not done yet. We need a v4l driver for the raspi-cam, which is not enabled out of the box. First you should do a firmware update of your raspberry to get the latest firmware and kernel driver - run the following in a terminal:

    sudo raspi-update
  • 2
    Continue setup of raspberry

    (The text-editor of hackadai.io sucks...)

    You need to load the v4l kernel driver now by typing into a terminal: 

    sudo modprobe bcm2835-v4l2

    If this worked without error messages, you should now have a device /dev/video0, check with 

    ls - l /dev/vid*  

    If this worked, add bcm2835-v4l2 to /etc/modules to enable the module at each start.

  • 3
    Install v4l2rtspserver

    For streaming we use v4l2rtspserver as it showed the lowest latency in our trials. Get the code from https://github.com/mpromonet/v4l2rtspserver

    Install it with:

    git clone https://github.com/mpromonet/h264v4l2rtspserver.git 
    cd h264v4l2rtspserver 
    cmake . 
    make install

     You might need to install cmake before with

    sudo apt-get install cmake

    Everything should finish without errors and you can test it now by starting the streaming server from a terminal:

    v4l2rtspserver -W 352 -H 288 -F 10 /dev/video0

    Connect with VLC on a computer in the same network to the IP of the raspberry rtsp://<raspberry>:8554/unicast to check if the streaming is working.