diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-05-25 00:45:47 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-05-25 00:45:47 +0300 |
commit | 469d7cc88a4cac53c644b235804ac568653ec01e (patch) | |
tree | a6ef2446d433507c27c527965d3abb36175ea9f3 | |
parent | a3198e30a48933b67513a6a4d7a10642721bc6ea (diff) |
update hls config
-rw-r--r-- | localwebsite/handlers/MiscHandler.php | 9 | ||||
-rwxr-xr-x | tools/ipcam_rtsp2hls.sh | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/localwebsite/handlers/MiscHandler.php b/localwebsite/handlers/MiscHandler.php index 486ff45..772cd9b 100644 --- a/localwebsite/handlers/MiscHandler.php +++ b/localwebsite/handlers/MiscHandler.php @@ -55,8 +55,15 @@ class MiscHandler extends RequestHandler list($hls_debug, $video_events) = $this->input('b:hls_debug, b:video_events'); $hls_opts = [ - 'startPosition' => -1 + 'startPosition' => -1, + + // // https://github.com/video-dev/hls.js/issues/3884#issuecomment-842380784 + 'liveSyncDuration' => 2, + 'liveMaxLatencyDuration' => 3, + 'maxLiveSyncPlaybackRate' => 2, + 'liveDurationInfinity' => true, ]; + if ($hls_debug) $hls_opts['debug'] = true; diff --git a/tools/ipcam_rtsp2hls.sh b/tools/ipcam_rtsp2hls.sh index a468715..70111b0 100755 --- a/tools/ipcam_rtsp2hls.sh +++ b/tools/ipcam_rtsp2hls.sh @@ -110,5 +110,5 @@ fi ffmpeg $args -i rtsp://${USER}:${PASSWORD}@${IP}:${PORT}/Streaming/Channels/${CHANNEL} \ -c:v copy -c:a copy -bufsize 1835k \ -pix_fmt yuv420p \ - -flags -global_header -hls_time 5 -hls_list_size 6 -hls_wrap 5 \ + -flags -global_header -hls_time 2 -hls_list_size 3 \ ${OUTDIR}/${NAME}/live.m3u8 |