From e772bdf14c46701552491dc337a21325c34e1ec2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Dec 2020 15:29:18 +0100 Subject: Load video in permanent live after last one ended --- server/helpers/ffmpeg-utils.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 9d6fe76cb..bf6408d3e 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -137,6 +137,8 @@ interface HLSTranscodeOptions extends BaseTranscodeOptions { interface HLSFromTSTranscodeOptions extends BaseTranscodeOptions { type: 'hls-from-ts' + isAAC: boolean + hlsPlaylist: { videoFilename: string } @@ -456,9 +458,12 @@ async function buildHLSVODFromTSCommand (command: ffmpeg.FfmpegCommand, options: const videoPath = getHLSVideoPath(options) command.outputOption('-c copy') - // Required for example when copying an AAC stream from an MPEG-TS - // Since it's a bitstream filter, we don't need to reencode the audio - command.outputOption('-bsf:a aac_adtstoasc') + + if (options.isAAC) { + // Required for example when copying an AAC stream from an MPEG-TS + // Since it's a bitstream filter, we don't need to reencode the audio + command.outputOption('-bsf:a aac_adtstoasc') + } addCommonHLSVODCommandOptions(command, videoPath) -- cgit v1.2.3