aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/ffmpeg-utils.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 75297df8f..f79b70469 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -679,10 +679,16 @@ function getFFmpegVersion () {
679 679
680 return execPromise(`${ffmpegPath} -version`) 680 return execPromise(`${ffmpegPath} -version`)
681 .then(stdout => { 681 .then(stdout => {
682 const parsed = stdout.match(/ffmpeg version .?(\d+\.\d+\.\d+)/) 682 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}`)) 683 if (!parsed || !parsed[1]) return rej(new Error(`Could not find ffmpeg version in ${stdout}`))
684 684
685 return res(parsed[1]) 685 // Fix ffmpeg version that does not include patch version (4.4 for example)
686 let version = parsed[1]
687 if (version.match(/^\d+\.\d+/)) {
688 version += '.0'
689 }
690
691 return res(version)
686 }) 692 })
687 .catch(err => rej(err)) 693 .catch(err => rej(err))
688 }) 694 })