\mainpage
C++ stack for streaming and managing multiple camera feeds on RoveSoCameraServer_Hardware, with virtual testing support.
RoveSoCameraServer_Software is the dedicated software stack for operating the RoveSoCameraServer_Hardware. It supports streaming from multiple camera feeds and provides robust tools for managing camera inputs and outputs. For testing purposes, this software is compatible with v4l2loopback
on Linux, allowing for virtual camera simulation on non-hardware setups.
Our documentation is automatically generated via Doxygen on each commit to the development
branch. Ensure you use the correct documentation templates to keep the documentation consistent.
Click here for full API documentation.
- Integrates seamlessly with RoveSoCameraServer_Hardware.
- Supports simultaneous streaming from multiple cameras.
- Easily configurable for streaming unique feeds to each camera.
- Virtual testing support using
v4l2loopback
on Linux.
- Operating System: Ubuntu (tested on 24.04+)
- Hardware: RoveSoCameraServer_Hardware (for production use)
- Testing Dependencies (optional):
v4l2loopback
for creating virtual cameras.ffmpeg
for streaming media files to virtual devices.
For testing purposes, you can install v4l2loopback
using either the standard package or from the source on GitHub to increase the maximum number of virtual devices.
-
Update package lists and install
v4l2loopback
:sudo apt update sudo apt install v4l2loopback-dkms v4l2loopback-utils
-
Load
v4l2loopback
with up to 8 virtual devices:sudo modprobe v4l2loopback devices=8 video_nr=0,1,2,3,4,5,6,7 exclusive_caps=1
To support more than 8 virtual devices, follow these steps to install v4l2loopback
from source and modify the maximum device limit:
-
Clone the
v4l2loopback
GitHub repository:git clone https://github.com/umlaeute/v4l2loopback.git cd v4l2loopback
-
Open
v4l2loopback.c
in a text editor and modify the maximum device limit:nano v4l2loopback.c
-
Find the line that defines
VIDEO_MAX_DEVICES
, which usually looks like this:#define VIDEO_MAX_DEVICES 8
-
Change
8
to10
(or any other desired limit):#define VIDEO_MAX_DEVICES 10
-
Save and close the file.
-
Build and install
v4l2loopback
:make sudo make install sudo depmod -a
-
Load
v4l2loopback
with 10 virtual devices:sudo modprobe v4l2loopback devices=10 video_nr=0,1,2,3,4,5,6,7,8,9 exclusive_caps=1
Install ffmpeg
if not already installed:
sudo apt install ffmpeg
-
Clone the
RoveSoCameraServer_Software
repository:git clone --recurse-submodules -j8 https://github.com/MissouriMRDT/RoveSoCameraServer_Software.git cd RoveSoCameraServer_Software
-
Prepare your media files (for testing purposes):
- Store images or videos you want to stream in a dedicated folder, such as
media/
. - Ensure they are named sequentially, e.g.,
image0.jpg
,image1.jpg
, etc., for easy configuration.
- Store images or videos you want to stream in a dedicated folder, such as
To deploy and run RoveSoCameraServer_Software on RoveSoCameraServer_Hardware, follow the specific hardware configuration instructions provided in the hardware documentation.
If RoveSoCameraServer_Hardware is unavailable, you can simulate streams on Linux using v4l2loopback
and ffmpeg
.
To stream images to each virtual camera:
nohup ffmpeg -re -loop 1 -i media/image0.jpg -vf format=yuv420p -f v4l2 /dev/video0 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image1.jpg -vf format=yuv420p -f v4l2 /dev/video1 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image2.jpg -vf format=yuv420p -f v4l2 /dev/video2 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image3.jpg -vf format=yuv420p -f v4l2 /dev/video3 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image4.jpg -vf format=yuv420p -f v4l2 /dev/video4 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image5.jpg -vf format=yuv420p -f v4l2 /dev/video5 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image6.jpg -vf format=yuv420p -f v4l2 /dev/video6 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image7.jpg -vf format=yuv420p -f v4l2 /dev/video7 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image8.jpg -vf format=yuv420p -f v4l2 /dev/video8 > /dev/null 2>&1 &
nohup ffmpeg -re -loop 1 -i media/image9.jpg -vf format=yuv420p -f v4l2 /dev/video9 > /dev/null 2>&1 &
Repeat for each virtual camera, modifying the image and device as needed.
Use ffplay
to verify each virtual camera:
ffplay /dev/video0
To stop all ffmpeg
processes:
killall ffmpeg
- Empty Streams: Ensure
ffmpeg
is configured with-vf format=yuv420p
, asv4l2loopback
may require specific formats. - Device Limitations:
v4l2loopback
may limit the number of devices. Modify settings as needed for testing.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.