From 9948cdb99954b9eefd969abbe9c3bec7d3bc0ef4 Mon Sep 17 00:00:00 2001 From: Sam Armstrong Date: Fri, 28 Sep 2018 10:43:46 +1000 Subject: [PATCH] Fix readme --- README.md | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 20652ff..cbeb9c2 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,21 @@ This is still very much a work in progress. Developing on Ubuntu 16.04 and 18.04 sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev libgstrtspserver-1.0-dev ``` +## Build into your catkin workspace +Navigate to your catkin workspace `src` folder. I.e. `cd ~/catkin_ws/src`. +Clone this package to the repository: +```bash +git clone https://github.com/CircusMonkey/ros_rtsp.git +``` + +Navigate back to the catkin workspace root and make the package: +```bash +cd .. +catkin_make pkg:=ros_rtsp +``` + ## Stream Setup -Change the config/stream_setup.yaml to suit your required streams. +Change the `config/stream_setup.yaml` to suit your required streams. ```yaml # Set up your streams to rtsp here. @@ -35,12 +48,14 @@ streams: # Cannot rename - must leave this as is. caps: video/x-raw,framerate=10/1,width=640,height=480 # Set the caps to be applied after getting the ROS Image and before the x265 encoder. bitrate: 500 # bitrate for the h264 encoding. ``` -Notes: -- Add as many streams as you need. If too much latency is encounted with multiple streams running, the server computer may be maxing out its processor trying to encode all the streams. Try reducing the resolution of the source caps. -- The ROS Image topic stream may be buggy with framerates too fast for the Image publisher and the buffer writing. Stick with 10/1 fps unless you want to debug? :) -- If too many frames are being dropped, it is likely due to network bandwidth. Try dropping the bitrate. +Add as many streams as you require. ## Checking the streams +Launch the streams from the ROS launch file: +```bash +roslaunch ros_rtsp rtsp_streams.launch +``` + ### gstreamer The best way to check a stream is working is to use `gst-launch-1.0`. You will need to install gstreamer for your client system. See https://gstreamer.freedesktop.org/documentation/installing/index.html ```bash @@ -53,3 +68,10 @@ The command I've had the lowest latency with is: ```bash vlc --no-audio --avcodec-hw=any --sout-rtp-proto=udp --network-caching=300 --sout-udp-caching=0 --clock-jitter=0 --rtp-max-misorder=0 rtsp://:8554/ :udp-timeout=0 ``` + + +## Debugging +- If too much latency is encounted with multiple streams running, the server computer may be maxing out its processor trying to encode all the streams. Try reducing the resolution of the source caps. +- The ROS Image topic stream may be buggy with framerates too fast for the Image publisher and the buffer writing. Stick with 10/1 fps unless you want to debug? :) +- If too many frames are being dropped, it is likely due to network bandwidth. Try dropping the bitrate. +- If the ROS topic isn't available, you will get a `can't prepare media` error after a delay. \ No newline at end of file