mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-03 13:13:00 +00:00
hls: make hlsEncryption optional even with Low-latency variant (#1530)
This commit is contained in:
parent
c51a686208
commit
4e579702ed
35
README.md
35
README.md
@ -104,6 +104,7 @@ In the next months, the repository name and the docker image name will be change
|
||||
* [Browser support](#browser-support)
|
||||
* [Embedding](#embedding)
|
||||
* [Low-Latency variant](#low-latency-variant)
|
||||
* [Low-Latency variant on Apple devices](#low-latency-variant-on-apple-devices)
|
||||
* [Decrease latency](#decrease-latency-1)
|
||||
* [WebRTC protocol](#webrtc-protocol)
|
||||
* [General usage](#general-usage-3)
|
||||
@ -1013,7 +1014,27 @@ For more advanced options, you can create and serve a custom web page by startin
|
||||
|
||||
Low-Latency HLS is a [recently standardized](https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis) variant of the protocol that allows to greatly reduce playback latency. It works by splitting segments into parts, that are served before the segment is complete.
|
||||
|
||||
LL-HLS is disabled by default. To enable it, a TLS certificate is needed and can be generated with OpenSSL:
|
||||
LL-HLS is disabled by default. To enable it, set the `hlsVariant` parameter in the configuration file:
|
||||
|
||||
```yml
|
||||
hlsVariant: lowLatency
|
||||
```
|
||||
|
||||
Every stream published to the server can be read with LL-HLS by visiting:
|
||||
|
||||
```
|
||||
https://localhost:8888/mystream
|
||||
```
|
||||
|
||||
If the stream is not shown correctly, try tuning the `hlsPartDuration` parameter, for instance:
|
||||
|
||||
```yml
|
||||
hlsPartDuration: 500ms
|
||||
```
|
||||
|
||||
### Low-Latency variant and Apple devices
|
||||
|
||||
In order to correctly display Low-Latency HLS streams in Safari running on Apple devices (iOS or macOS), a TLS certificate is needed and can be generated with OpenSSL:
|
||||
|
||||
```
|
||||
openssl genrsa -out server.key 2048
|
||||
@ -1029,18 +1050,6 @@ hlsServerKey: server.key
|
||||
hlsServerCert: server.crt
|
||||
```
|
||||
|
||||
Every stream published to the server can be read with LL-HLS by visiting:
|
||||
|
||||
```
|
||||
https://localhost:8888/mystream
|
||||
```
|
||||
|
||||
If the stream is not shown correctly, try tuning the `hlsPartDuration` parameter, for instance:
|
||||
|
||||
```yml
|
||||
hlsPartDuration: 500ms
|
||||
```
|
||||
|
||||
### Decrease latency
|
||||
|
||||
in HLS, latency is introduced since a client must wait for the server to generate segments before downloading them. This latency amounts to 1-15secs depending on the duration of each segment, and to 500ms-3s if the Low-Latency variant is enabled.
|
||||
|
@ -389,10 +389,6 @@ func (conf *Conf) CheckAndFillMissing() error {
|
||||
return fmt.Errorf("Low-Latency HLS requires at least 7 segments")
|
||||
}
|
||||
|
||||
if !conf.HLSEncryption {
|
||||
return fmt.Errorf("Low-Latency HLS requires encryption")
|
||||
}
|
||||
|
||||
default:
|
||||
if conf.HLSSegmentCount < 3 {
|
||||
return fmt.Errorf("The minimum number of HLS segments is 3")
|
||||
|
Loading…
Reference in New Issue
Block a user