* [Redirect to another server](#redirect-to-another-server)
* [Fallback stream](#fallback-stream)
* [Authentication](#authentication)
* [Start on boot with systemd](#start-on-boot-with-systemd)
* [Monitoring](#monitoring)
* [Command-line usage](#command-line-usage)
* [Compile and run from source](#compile-and-run-from-source)
* [Links](#links)
## Installation
### Standard
1. Download and extract a precompiled binary from the [release page](https://github.com/aler9/rtsp-simple-server/releases).
1. Download and extract a precompiled binary from the [release page](https://github.com/aler9/rtsp-simple-server/releases).
@ -29,7 +54,23 @@ Features:
./rtsp-simple-server
./rtsp-simple-server
```
```
3. Publish a stream. For instance, you can publish a video/audio file with _FFmpeg_:
### Docker
Download and launch the image:
```
docker run --rm -it --network=host aler9/rtsp-simple-server
```
The `--network=host` flag is mandatory since Docker can change the source port of UDP packets for routing reasons, and this makes RTSP routing impossible. This issue can be avoided by disabling UDP and exposing the RTSP port:
```
docker run --rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 aler9/rtsp-simple-server
```
## Basic usage
1. Publish a stream. For instance, you can publish a video/audio file with _FFmpeg_:
4. Open the stream. For instance, you can open the stream with _VLC_:
2. Open the stream. For instance, you can open the stream with _VLC_:
```
```
vlc rtsp://localhost:8554/mystream
vlc rtsp://localhost:8554/mystream
@ -61,20 +102,6 @@ Features:
## Advanced usage and FAQs
## Advanced usage and FAQs
### Usage with Docker
Download and launch the image:
```
docker run --rm -it --network=host aler9/rtsp-simple-server
```
The `--network=host` argument is mandatory since Docker can change the source port of UDP packets for routing reasons, and this makes RTSP routing impossible. This issue can be avoided by disabling UDP and exposing the RTSP port:
```
docker run --rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 aler9/rtsp-simple-server
```
### Configuration
### Configuration
To see or change the configuration, edit the `rtsp-simple-server.yml` file, that is:
To see or change the configuration, edit the `rtsp-simple-server.yml` file, that is:
@ -361,7 +388,7 @@ There are multiple ways to monitor the server usage over time:
go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=30
go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=30