aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffmpeg-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/ffmpeg-utils.ts')
-rw-r--r--server/helpers/ffmpeg-utils.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index c0e9702a8..7a4ac0970 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -130,6 +130,7 @@ interface BaseTranscodeOptions {
130 130
131interface HLSTranscodeOptions extends BaseTranscodeOptions { 131interface HLSTranscodeOptions extends BaseTranscodeOptions {
132 type: 'hls' 132 type: 'hls'
133 copyCodecs: boolean
133 hlsPlaylist: { 134 hlsPlaylist: {
134 videoFilename: string 135 videoFilename: string
135 } 136 }
@@ -232,7 +233,7 @@ export {
232 233
233// --------------------------------------------------------------------------- 234// ---------------------------------------------------------------------------
234 235
235async function buildx264Command (command: ffmpeg.FfmpegCommand, options: VideoTranscodeOptions) { 236async function buildx264Command (command: ffmpeg.FfmpegCommand, options: TranscodeOptions) {
236 let fps = await getVideoFileFPS(options.inputPath) 237 let fps = await getVideoFileFPS(options.inputPath)
237 // On small/medium resolutions, limit FPS 238 // On small/medium resolutions, limit FPS
238 if ( 239 if (
@@ -287,7 +288,8 @@ async function buildQuickTranscodeCommand (command: ffmpeg.FfmpegCommand) {
287async function buildHLSCommand (command: ffmpeg.FfmpegCommand, options: HLSTranscodeOptions) { 288async function buildHLSCommand (command: ffmpeg.FfmpegCommand, options: HLSTranscodeOptions) {
288 const videoPath = getHLSVideoPath(options) 289 const videoPath = getHLSVideoPath(options)
289 290
290 command = await presetCopy(command) 291 if (options.copyCodecs) command = await presetCopy(command)
292 else command = await buildx264Command(command, options)
291 293
292 command = command.outputOption('-hls_time 4') 294 command = command.outputOption('-hls_time 4')
293 .outputOption('-hls_list_size 0') 295 .outputOption('-hls_list_size 0')