diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/youtube-dl.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index 782dd2e2e..c188739ff 100644 --- a/server/helpers/youtube-dl.ts +++ b/server/helpers/youtube-dl.ts | |||
@@ -48,6 +48,11 @@ function downloadYoutubeDLVideo (url: string, timeout: number) { | |||
48 | 48 | ||
49 | const options = [ '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best', '-o', path ] | 49 | const options = [ '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best', '-o', path ] |
50 | 50 | ||
51 | if (process.env.FFMPEG_PATH) { | ||
52 | options.push('--ffmpeg-location') | ||
53 | options.push(process.env.FFMPEG_PATH) | ||
54 | } | ||
55 | |||
51 | return new Promise<string>(async (res, rej) => { | 56 | return new Promise<string>(async (res, rej) => { |
52 | const youtubeDL = await safeGetYoutubeDL() | 57 | const youtubeDL = await safeGetYoutubeDL() |
53 | youtubeDL.exec(url, options, processOptions, err => { | 58 | youtubeDL.exec(url, options, processOptions, err => { |