Skip to content

crossan007/PiCamFleetMapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiCamFleetMapper

Simplifies the use of networked video sources with VoctoCore by:

  • Providing an auto-discovery daemon to inform networked sources of the VoctoCore server address
  • Automatically launching an intermediate Gstreamer pipeline to convert the incoming video frames into something VoctoCore will tolerate
  • Automatically launching the gstreamer instance on the networked camera configured for Voctocore

Installation Instructions

  1. Start with a base installation of Raspbian Stretch Lite
  2. Pre-stage wpa_supplicant.conf and ssd on the SD card's /boot volume for frist-time headless connection to wifi
  3. Install prerequisites
sudo apt-get update
sudo apt-get install -y git autoconf automake libtool pkg-config libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libraspberrypi-dev
sudo apt-get install -y gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools libgstreamer1.0-0 python3 python3-gi python3-gi-cairo gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 gstreamer1.0-tools

  1. Enable the rpi camera interface
printf "start_x=1\ngpu_mem=128" | sudo tee -a /boot/config.txt
  1. Build GStreamer rpicamsrc
cd ~
git clone https://github.com/thaytan/gst-rpicamsrc.git
cd gst-rpicamsrc
./autogen.sh --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf/
make
sudo make install

  1. Install PiCamFleetMapper
cd ~
git clone https://github.com/crossan007/PiCamFleetMapper.git
cd PiCamFleetMapper
sudo cp camera.service /etc/systemd/system/
sudo systemctl enable camera.service
  1. Reboot the pi.

  2. (Once per device) Configure the connection to core

    The first time a camera locates the master, it will attempt to download its configuration. If there is no config entry corresponding with the camera's MAC address, an empty one will be added to remotes.ini. Be sure to configure the camera. Below is a sample config:

[b8:27:eb:24:b0:41]
name = PiThreeMobile-wifi
core_port = 10000
video_port = 20002
offset = -1900
client_src = rpicamsrc name=videosrc keyframe-interval=10 shutter-speed=0 iso=200 drc=0 exposure-mode=1 metering-mode=1 awb_mode=6 bitrate=0 quantisation-parameter=22 do-timestamp=true ! h264parse ! video/x-h264,framerate=30/1,width=1280,height=720
server_custom_pipe = videoflip method=rotate-180 !
virtual_camera_angles = 
decode = decodebin

Example Topology

RasPi Cam v2 --(rpicamsrc)-->  RaspberryPi Zero * \
                                                   \
                                                    \
RasPi Cam v2 --(rpicamsrc)-->  RaspberryPi 3 *      |
                                                    |
                                         [Wi-Fi Access Point]
                                                    |
                                               [Ethernet]
                                                    |
Logitec C922X --(v4l2src) -->  RaspberryPi 3*  ---> |                                      
                                                    |
                                      [PiCamFleetMapper - Master]
                                                    |
Allen and Heath QU32 (USB) --(alsasrc)---->   [VoctoCore]   <<----(ximagesrc) -- Presentation PC FrameGrabber (Matroska / MJPEG)

* All RaspberyPi Devices are running PiCamFleetMapper to sync clock and download config from master.
   Transport from Pi to Core is in a Matroska container, and can be any codec.  The above pipeline uses h264 for rpicamsrc, and MJPEG for v4l2src.

voctogui

About

Automate GStreamer pipeline connections

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages