aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts1
-rw-r--r--server/helpers/ffmpeg-utils.ts4
2 files changed, 4 insertions, 1 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index c77249a02..2edfb267e 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -29,6 +29,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
29 { value: 50 * 1024 * 1024 * 1024, label: '50GB' } 29 { value: 50 * 1024 * 1024 * 1024, label: '50GB' }
30 ] 30 ]
31 transcodingThreadOptions = [ 31 transcodingThreadOptions = [
32 { value: 0, label: 'auto (not optimized)' },
32 { value: 1, label: '1' }, 33 { value: 1, label: '1' },
33 { value: 2, label: '2' }, 34 { value: 2, label: '2' },
34 { value: 4, label: '4' }, 35 { value: 4, label: '4' },
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index f0e2c0af5..c170fc1a8 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -86,8 +86,10 @@ function transcode (options: TranscodeOptions) {
86 return new Promise<void>(async (res, rej) => { 86 return new Promise<void>(async (res, rej) => {
87 let command = ffmpeg(options.inputPath, { 'niceness': FFMPEG_NICE.TRANSCODING }) 87 let command = ffmpeg(options.inputPath, { 'niceness': FFMPEG_NICE.TRANSCODING })
88 .output(options.outputPath) 88 .output(options.outputPath)
89 .outputOption('-threads ' + CONFIG.TRANSCODING.THREADS)
90 .preset(standard) 89 .preset(standard)
90 if (CONFIG.TRANSCODING.THREADS > 0) {
91 command.outputOption('-threads ' + CONFIG.TRANSCODING.THREADS) // if we don't set any threads ffmpeg will chose automatically
92 }
91 93
92 let fps = await getVideoFileFPS(options.inputPath) 94 let fps = await getVideoFileFPS(options.inputPath)
93 if (options.resolution !== undefined) { 95 if (options.resolution !== undefined) {