Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

Commit

Permalink
Update README.md to add examples and doc on digest auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Ullaakut committed Jun 7, 2018
1 parent 69a1a8d commit eda5ae8
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
```
Expand All @@ -47,6 +48,7 @@ docker run --rm \
[-s rtsp_resolution] \
[-f rtsp_framerate] \
[-t] \
[-d] \
[-i input]
```

Expand All @@ -64,24 +66,33 @@ 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**
- If it starts with `pattern:` if will create a **test video with the given pattern** (_see [this link](https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videotestsrc.html#GstVideoTestSrcPattern) for more information on this argument_)
- 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_)

## Examples

<p align="center"><img src="https://preview.ibb.co/emxVna/Example_Screen_Shot.png" alt="Ball"></p>

> 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:
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit eda5ae8

Please sign in to comment.