X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fffmpeg-utils.ts;h=bf6408d3e1c63b116c239b779b0622f47209766e;hb=e772bdf14c46701552491dc337a21325c34e1ec2;hp=9d6fe76cb97961d0c1d4cad932af607071a76020;hpb=3851e732c4b1da0bc0c40a46ed5a89d93cdc5389;p=github%2FChocobozzz%2FPeerTube.git 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)