From 4bad36345a1444e40a3f18d79baf260ee8f7de09 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:53:45 +0100 Subject: [PATCH] update readme --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 6b18d70d..0badeeac 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,8 @@ Features: * [Embedding](#embedding) * [Low-Latency variant](#low-latency-variant) * [Decreasing latency](#decreasing-latency) +* [WebRTC protocol](#webrtc-protocol) + * [General usage](#general-usage-3) * [Links](#links) ## Installation @@ -968,6 +970,31 @@ To decrease the latency, you can: ffmpeg -i rtsp://original-stream -pix_fmt yuv420p -c:v libx264 -preset ultrafast -b:v 600k -max_muxing_queue_size 1024 -g 30 -f rtsp rtsp://localhost:$RTSP_PORT/compressed ``` +## WebRTC protocol + +### General usage + +a TLS certificate is needed and can be generated with OpenSSL: + +``` +openssl genrsa -out server.key 2048 +openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 +``` + +Set the `webrtc`, `webrtcServerKey` and `webrtcServerCert` parameters in the configuration file: + +```yml +webrtc: yes +webrtcServerKey: server.key +webrtcServerCert: server.crt +``` + +Every stream published to the server can be read with WebRTC by visiting: + +``` +https://localhost:8889/mystream +``` + ## Links Related projects