It is recommended to to the following steps in a new VM in order to not accidently mess up an existing installation!
sudo apt-get install build-essential
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install libglib2.0-dev
Get the required GStreamer sources from https://gstreamer.freedesktop.org/src/. Focus on version 1.14.2
-
Download
- gstreamer https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.14.2.tar.xz
- gst-plugins-base https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.14.2.tar.xz
- gst-plugins-good https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.14.2.tar.xz
- gst-rtsp-server https://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-server-1.14.2.tar.xz
-
Unpack
tar.xz
files
tar -xf <filename>
- Change into each of the unpacked dirs
- Execute these commands in each directory
./configure
make
sudo make install
- Change into
gst-rtsp-server-1.14.2/examples
- Attach a webcam via USB, make sure to have
/dev/video0
(or change to whatever is there)
ls /dev/video*
- Run server command
Running a test image
./test-launch --gst-debug=3 '( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )'
Using /dev/video0 and H.264 software encoder
./test-launch --gst-debug=3 '( v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480,framerate=30/1 ! x264enc tune="zerolatency" byte-stream=true bitrate=2000 ! rtph264pay name=pay0 pt=96 )'
If your camera exposes H.264 directly (ways less CPU power required)
./test-launch --gst-debug=0 '( v4l2src device=/dev/video0 ! video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! rtph264pay name=pay0 pt=96 )'
Consume the stream on a Mac, replace ip-of-rtsp-server
by the real IP (GStreamer installation required)
/Library/Frameworks/GStreamer.framework/Commands/gst-launch-1.0 -v rtspsrc location=rtsp://<ip-of-rtsp-server>:8554/test latency=0 buffer-mode=auto ! decodebin ! videoconvert ! osxvideosink sync=false
Consume on a Linux system, replace ip-of-rtsp-server
by the real IP (GStreamer installation required)
gst-launch-1.0 -v rtspsrc location=rtsp://<ip-of-rtsp-server>:8554/test latency=0 buffer-mode=auto ! decodebin ! videoconvert ! autovideosink sync=false
Unfortunately you are right. I don't have an Ubuntu 16.04 anymore, but installed 1.14.5 on a fresh 18.04. Same symptom, same 503. No more information.
Will give it another try with 1.16.2