Rtsp Server Launcher to create an onvif compatible rtsp stream.
This is only an rtsp stream launcher that doesn't offer any soap capabilities.
The goal of this utility is to have an pluggable process that can be launched from an Onvif Server. (e.g. rpos)
- Extended GstRtspMediaFactory to manipulate pipeline dynamically.
- v4l2 capability discovery to find compatible capture configuration. (Adjust FPS and Resolution)
- onvifserver will intentionally fail if configuration requires increasing FPS or scaling up resolution
- Raw Capture Input (YUV2 for now)
- RPi Legacy OMX hardware support. (Single stream)
- RPi Bullseye v4l2 hardware support (Single stream)
- openh264, x264, libav software support.
- Nvidia support can easily be enabled, but causes unrelated issues on my laptop so I disabled it for now.
- Backchannel audio stream.
- Snapshots capabilities (To support ONVIF Snapshot command)
- Multi-stream support.
- backchannel stream doesn't support shared media causing a v4l2 resource busy error
- Solution might be to use a shared pipeline and dynamically adding pads to a "tee" element. This solution also brings advantages like running a single encoding task for multiple streams.
- RockPro64 hardware support (rkmpp)
Usage: onvifserver [OPTION...]
Your program description.
-a, --audio=AUDIO Input audio device. (Default: auto)
-e, --encoder=ENCODER Gstreamer encoder. (Default: auto)
-f, --fps=FPS Video output framerate. (Default: 10)
-h, --height=HEIGHT Video output height. (Default: 480)
-m, --mount=MOUNT URL mount point. (Default: h264)
-p, --port=PORT Network port to listen. (Default: 8554)
-v, --video=VIDEO Input video device. (Default: /dev/video0)
-w, --width=WIDTH Video output width. (Default: 640)
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
Note that I don't like depending on sudo. I will eventually get around to identifying and building missing dependencies.
Install the latest build tools from pip and apt
sudo apt install python3-pip
python3 -m pip install pip --upgrade
python3 -m pip install meson
python3 -m pip install ninja
sudo apt install gettext
sudo apt install pkg-config
sudo apt install libtool
sudo apt install flex
sudo apt install bison
sudo apt install nasm
sudo apt install libasound2-dev
sudo apt install libpulse-dev
sudo apt install libgudev-1.0-dev
sudo apt install libv4l-dev
I'm not sure if this is true for all distros, but this is required to get the new binary in the system's PATH
export PATH=$PATH:$HOME/.local/bin
git clone https://github.com/Quedale/OnvifRtspLauncher.git
cd OnvifRtspLauncher
This project support out-of-tree build to keep src directory clean.
Generic build:
mkdir build && cd build
../autogen.sh --prefix=$(pwd)/dist
Raspberry Pi Legacy build:
mkdir build && cd build
../autogen.sh --enable-rpi --prefix=$(pwd)/dist
make
make install
Static executables can be found under OnvifRtspLauncher/build/dist/bin