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.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 75297df8f..e328c49ac 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -236,7 +236,6 @@ async function getLiveTranscodingCommand (options: {
236 } 236 }
237 ] 237 ]
238 238
239 command.outputOption('-preset superfast')
240 command.outputOption('-sc_threshold 0') 239 command.outputOption('-sc_threshold 0')
241 240
242 addDefaultEncoderGlobalParams({ command }) 241 addDefaultEncoderGlobalParams({ command })
@@ -679,10 +678,16 @@ function getFFmpegVersion () {
679 678
680 return execPromise(`${ffmpegPath} -version`) 679 return execPromise(`${ffmpegPath} -version`)
681 .then(stdout => { 680 .then(stdout => {
682 const parsed = stdout.match(/ffmpeg version .?(\d+\.\d+\.\d+)/) 681 const parsed = stdout.match(/ffmpeg version .?(\d+\.\d+(\.\d+)?)/)
683 if (!parsed || !parsed[1]) return rej(new Error(`Could not find ffmpeg version in ${stdout}`)) 682 if (!parsed || !parsed[1]) return rej(new Error(`Could not find ffmpeg version in ${stdout}`))
684 683
685 return res(parsed[1]) 684 // Fix ffmpeg version that does not include patch version (4.4 for example)
685 let version = parsed[1]
686 if (version.match(/^\d+\.\d+$/)) {
687 version += '.0'
688 }
689
690 return res(version)
686 }) 691 })
687 .catch(err => rej(err)) 692 .catch(err => rej(err))
688 }) 693 })