From eda5ae8b8ae349c351dcf28fd8ce03759c1d1328 Mon Sep 17 00:00:00 2001 From: Brendan Le Glaunec Date: Thu, 7 Jun 2018 07:55:32 +0200 Subject: [PATCH] Update README.md to add examples and doc on digest auth --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d2577d7..5cc8729 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/ullaakut/rtspatt.svg?style=flat)](https://hub.docker.com/r/ullaakut/rtspatt/) [![Latest release](https://img.shields.io/github/release/EtixLabs/RTSPAllTheThings.svg?style=flat)](https://github.com/EtixLabs/RTSPAllTheThings/releases/latest) -### A multipurpose RTSP media server that can simulate RTSP cameras, broadcast RTSP streams, webcams and even create test videos or serve video files. +**A multipurpose RTSP media server that can simulate RTSP cameras, broadcast RTSP streams, webcams and even create test videos or serve video files.** ## Dependencies @@ -33,6 +33,7 @@ docker run --rm \ [-e RTSP_FRAMERATE=your_framerate] \ [-e INPUT=your_input] \ [-e ENABLE_TIME_OVERLAY=true|false] \ + [-e RTSP_AUTHENTICATION_METHOD=digest|basic] \ [-e GST_DEBUG=your_debug_level] \ ullaakut/rtspatt ``` @@ -47,6 +48,7 @@ docker run --rm \ [-s rtsp_resolution] \ [-f rtsp_framerate] \ [-t] \ + [-d] \ [-i input] ``` @@ -64,9 +66,9 @@ All of these environment variables and command line arguments override the defau * `RTSP_PASSWORD` | `-p`: If you want to enable security on your stream, using this option will allow you to specify the password required to access your stream [default: none] * `RTSP_RESOLUTION` | `-s`: - The resolution at which you want to stream [default: `1280x720`] - RTSPATT will have to do encoding to resize the stream (CPU usage) + The resolution at which you want to stream [default: `1280x720`] - RTSPATT will have to do encoding to resize the stream (Increased CPU usage) * `RTSP_FRAMERATE` | `-f`: - The desired output framerate for your stream [default: `25`] - RTSPATT will have to do encoding to change the framerate (CPU usage) + The desired output framerate for your stream [default: `25`] - RTSPATT will have to do encoding to change the framerate (Increased CPU usage) * `INPUT` | `-i`: Input used as video source. [default: `pattern:smtpe`] - If the argument starts with `rtsp://` it will try to open it as an **RTSP stream** @@ -74,7 +76,9 @@ All of these environment variables and command line arguments override the defau - If the argument starts with `/dev/video` it will create a stream from the /dev/video device passed into docker at the launch of the instance. You will need to pass in the video device as follows: `--device=/dev/video0:/dev/video0` where `video0` is the video device. - Otherwise it will use the argument as a absolute link to **file input**. Remember to use the `-v` option to insert a video into your container if you want to read it. Example: `docker run -e INPUT=/tmp/video.mp4 -v /home/test/documents/myVideo.mp4:/tmp/video -p 8554:8554 ullaakut/rtspatt`. The repository contains a 30 second sample video in the `samples` folder. * `ENABLE_TIME_OVERLAY` | `-t`: - If the environment variable is set to true or the command line flag is used, a time overlay will be added to the stream. This can be useful to debug latency. [default: disabled] - RTSPATT will have to do encoding to add the time (CPU usage) + If the environment variable is set to true or the command line flag is used, a time overlay will be added to the stream. This can be useful to debug latency. [default: disabled] - RTSPATT will have to do encoding to add the time (Increased CPU usage) +* `RTSP_AUTHENTICATION_METHOD` | `-d`: + If RTSP_AUTHENTICATION_METHOD is set to `digest` or the command line flag is used, the authentication will be done using digest instead of basic auth. [default: basic] * `GST_DEBUG`: The desired debug level for GStreamer [default: none] (_see [this link](https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html) for more information on this variable_) @@ -82,6 +86,13 @@ All of these environment variables and command line arguments override the defau

Ball

+> Serve video using basic auth on `rtsp:admin:test@//0.0.0.0:8554/live.sdp` + +`docker run --rm -e RTSP_USERNAME=admin -e RTSP_PASSWORD=test -p 8554:8554 rtspatt` + +> Serve video using digest auth on `rtsp:admin:test@//0.0.0.0:8554/live.sdp` + +`docker run --rm -e RTSP_AUTHENTICATION_METHOD=digest -e RTSP_USERNAME=admin -e RTSP_PASSWORD=test -p 8554:8554 rtspatt` > Launch an RTSP stream on `rtsp://0.0.0.0:8554/live.sdp` with a snow pattern and a resolution of 960x600 pixels: @@ -92,6 +103,7 @@ All of these environment variables and command line arguments override the defau `docker run --rm -e INPUT="rtsp://root:root@camera_ip:554/live.sdp" -e RTSP_FRAMERATE=12 -p 8554:8554 ullaakut/rtspatt` or `./rtspatt -i rtsp://root:root@camera_ip:554/live.sdp -f 12` > Broadcast a video stream from a connected device: + `docker run --rm -e INPUT="/dev/video0" --device=/dev/video0:/dev/video0 -p 8554:8554 rtspatt` > Serve a video file on a specific address and route: @@ -112,6 +124,7 @@ With default options, stream will be available at `rtsp://0.0.0.0:8554/live.sdp` You can use [override options](#override-options). ## Patterns + Here is the list of patterns you can use * `pattern:smpte` - The standard SMTPE test pattern, it's the default value if you don't specify any input