update hls config

This commit is contained in:
Evgeny Zinoviev 2022-05-25 00:45:47 +03:00
parent a3198e30a4
commit 469d7cc88a
2 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -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