aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorJorropo <jorropo.pgm@gmail.com>2018-07-27 20:41:05 +0200
committerChocobozzz <me@florianbigard.com>2018-08-01 10:57:13 +0200
commit991feec9a3f371e28274884f7635dc2e57dca284 (patch)
treeec1e0ae9b58aa262a08f5737738bab0c40e7b479 /server/helpers
parent19ca8ca93975d99c16ab94c1526a34be74f63b95 (diff)
downloadPeerTube-991feec9a3f371e28274884f7635dc2e57dca284.tar.gz
PeerTube-991feec9a3f371e28274884f7635dc2e57dca284.tar.zst
PeerTube-991feec9a3f371e28274884f7635dc2e57dca284.zip
ffmpeg auto thread
Set thread count to 0 and ffmpeg will chose automaticaly
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/ffmpeg-utils.ts4
1 files changed, 3 insertions, 1 deletions
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) {