From 49bcdb0d6699f19d359f40e974cdffd93a4b34c7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Dec 2020 10:33:07 +0100 Subject: Try to fix live freeze --- server/helpers/ffmpeg-utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server') diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 0aadf694e..1093cb483 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -208,7 +208,6 @@ async function getLiveTranscodingCommand (options: { const input = rtmpUrl const command = getFFmpeg(input, 'live') - command.inputOption('-fflags nobuffer') const varStreamMap: string[] = [] @@ -229,6 +228,7 @@ async function getLiveTranscodingCommand (options: { ]) command.outputOption('-preset superfast') + command.outputOption('-sc_threshold 0') addDefaultEncoderGlobalParams({ command }) @@ -290,7 +290,6 @@ async function getLiveTranscodingCommand (options: { function getLiveMuxingCommand (rtmpUrl: string, outPath: string) { const command = getFFmpeg(rtmpUrl, 'live') - command.inputOption('-fflags nobuffer') command.outputOption('-c:v copy') command.outputOption('-c:a copy') @@ -371,7 +370,7 @@ function addDefaultEncoderParams (options: { function addDefaultLiveHLSParams (command: ffmpeg.FfmpegCommand, outPath: string) { command.outputOption('-hls_time ' + VIDEO_LIVE.SEGMENT_TIME_SECONDS) command.outputOption('-hls_list_size ' + VIDEO_LIVE.SEGMENTS_LIST_SIZE) - command.outputOption('-hls_flags delete_segments') + command.outputOption('-hls_flags delete_segments+independent_segments') command.outputOption(`-hls_segment_filename ${join(outPath, '%v-%06d.ts')}`) command.outputOption('-master_pl_name master.m3u8') command.outputOption(`-f hls`) -- cgit v1.2.3