aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-04 10:33:07 +0100
committerChocobozzz <me@florianbigard.com>2020-12-04 10:40:53 +0100
commit49bcdb0d6699f19d359f40e974cdffd93a4b34c7 (patch)
tree0fe4d6c819b0ececbbb80fc3fc9b7f266c286773 /server
parent55223d65744daf74407fb6a21873aa11019c8d15 (diff)
downloadPeerTube-49bcdb0d6699f19d359f40e974cdffd93a4b34c7.tar.gz
PeerTube-49bcdb0d6699f19d359f40e974cdffd93a4b34c7.tar.zst
PeerTube-49bcdb0d6699f19d359f40e974cdffd93a4b34c7.zip
Try to fix live freeze
Diffstat (limited to 'server')
-rw-r--r--server/helpers/ffmpeg-utils.ts5
1 files changed, 2 insertions, 3 deletions
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: {
208 const input = rtmpUrl 208 const input = rtmpUrl
209 209
210 const command = getFFmpeg(input, 'live') 210 const command = getFFmpeg(input, 'live')
211 command.inputOption('-fflags nobuffer')
212 211
213 const varStreamMap: string[] = [] 212 const varStreamMap: string[] = []
214 213
@@ -229,6 +228,7 @@ async function getLiveTranscodingCommand (options: {
229 ]) 228 ])
230 229
231 command.outputOption('-preset superfast') 230 command.outputOption('-preset superfast')
231 command.outputOption('-sc_threshold 0')
232 232
233 addDefaultEncoderGlobalParams({ command }) 233 addDefaultEncoderGlobalParams({ command })
234 234
@@ -290,7 +290,6 @@ async function getLiveTranscodingCommand (options: {
290 290
291function getLiveMuxingCommand (rtmpUrl: string, outPath: string) { 291function getLiveMuxingCommand (rtmpUrl: string, outPath: string) {
292 const command = getFFmpeg(rtmpUrl, 'live') 292 const command = getFFmpeg(rtmpUrl, 'live')
293 command.inputOption('-fflags nobuffer')
294 293
295 command.outputOption('-c:v copy') 294 command.outputOption('-c:v copy')
296 command.outputOption('-c:a copy') 295 command.outputOption('-c:a copy')
@@ -371,7 +370,7 @@ function addDefaultEncoderParams (options: {
371function addDefaultLiveHLSParams (command: ffmpeg.FfmpegCommand, outPath: string) { 370function addDefaultLiveHLSParams (command: ffmpeg.FfmpegCommand, outPath: string) {
372 command.outputOption('-hls_time ' + VIDEO_LIVE.SEGMENT_TIME_SECONDS) 371 command.outputOption('-hls_time ' + VIDEO_LIVE.SEGMENT_TIME_SECONDS)
373 command.outputOption('-hls_list_size ' + VIDEO_LIVE.SEGMENTS_LIST_SIZE) 372 command.outputOption('-hls_list_size ' + VIDEO_LIVE.SEGMENTS_LIST_SIZE)
374 command.outputOption('-hls_flags delete_segments') 373 command.outputOption('-hls_flags delete_segments+independent_segments')
375 command.outputOption(`-hls_segment_filename ${join(outPath, '%v-%06d.ts')}`) 374 command.outputOption(`-hls_segment_filename ${join(outPath, '%v-%06d.ts')}`)
376 command.outputOption('-master_pl_name master.m3u8') 375 command.outputOption('-master_pl_name master.m3u8')
377 command.outputOption(`-f hls`) 376 command.outputOption(`-f hls`)