* [Save published videos to disk](#save-published-videos-to-disk)
* [On-demand publishing](#on-demand-publishing)
@ -58,6 +56,10 @@ Plus:
@@ -58,6 +56,10 @@ Plus:
* [Metrics](#metrics)
* [pprof](#pprof)
* [Compile and run from source](#compile-and-run-from-source)
* [Publish to the server](#publish-to-the-server)
* [Webcam](#webcam)
* [Raspberry Pi Camera](#raspberry-pi-camera)
* [OBS Studio](#obs-studio)
* [RTSP protocol FAQs](#rtsp-protocol-faqs)
* [RTSP general usage](#rtsp-general-usage)
* [TCP transport](#tcp-transport)
@ -68,7 +70,6 @@ Plus:
@@ -68,7 +70,6 @@ Plus:
* [Corrupted frames](#corrupted-frames)
* [RTMP protocol FAQs](#rtmp-protocol-faqs)
* [RTMP general usage](#rtmp-general-usage)
* [Publish from OBS Studio](#publish-from-obs-studio)
* [HLS protocol FAQs](#hls-protocol-faqs)
* [HLS general usage](#hls-general-usage)
* [Decrease delay](#decrease-delay)
@ -116,6 +117,8 @@ Please keep in mind that the Docker image doesn't include _FFmpeg_. if you need
@@ -116,6 +117,8 @@ Please keep in mind that the Docker image doesn't include _FFmpeg_. if you need
After starting the server, the camera is available on `rtsp://localhost:8554/cam`.
### Remuxing, re-encoding, compression
To change the format, codec or compression of a stream, use _FFmpeg_ or _Gstreamer_ together with _rtsp-simple-server_. For instance, to re-encode an existing stream, that is available in the `/original` path, and publish the resulting stream in the `/compressed` path, edit `rtsp-simple-server.yml` and replace everything inside section `paths` with the following content:
@ -472,6 +424,73 @@ You can perform the entire operation inside Docker:
@@ -472,6 +424,73 @@ You can perform the entire operation inside Docker:
make run
```
## Publish to the server
### Webcam
To publish the video stream of a generic webcam to the server, edit `rtsp-simple-server.yml` and replace everything inside section `paths` with the following content:
After starting the server, the camera is available on `rtsp://localhost:8554/cam`.
### OBS Studio
OBS Studio can publish to the server by using the RTMP protocol. In `Settings -> Stream` (or in the Auto-configuration Wizard), use the following parameters:
* Service: `Custom...`
* Server: `rtmp://localhost`
* Stream key: `mystream`
If credentials are in use, use the following parameters:
* Service: `Custom...`
* Server: `rtmp://localhost`
* Stream key: `mystream?user=myuser&pass=mypass`
## RTSP protocol FAQs
### RTSP general usage
@ -646,20 +665,6 @@ Credentials can be provided by appending to the URL the `user` and `pass` parame
@@ -646,20 +665,6 @@ Credentials can be provided by appending to the URL the `user` and `pass` parame
OBS Studio can publish to the server by using the RTMP protocol. In `Settings -> Stream` (or in the Auto-configuration Wizard), use the following parameters:
* Service: `Custom...`
* Server: `rtmp://localhost`
* Stream key: `mystream`
If credentials are in use, use the following parameters: