aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-03 10:16:18 +0200
committerChocobozzz <me@florianbigard.com>2019-04-03 10:16:18 +0200
commit5322589d16b6f13bd3e059d67ee569d767289d4c (patch)
tree052f3d215cdaeb9c0b80409a9f4a41b203ff28b9
parentc47106315ae3c403239cda29c49b4bba51ddccb2 (diff)
downloadPeerTube-5322589d16b6f13bd3e059d67ee569d767289d4c.tar.gz
PeerTube-5322589d16b6f13bd3e059d67ee569d767289d4c.tar.zst
PeerTube-5322589d16b6f13bd3e059d67ee569d767289d4c.zip
Use custom ffmpeg path in youtube dl
-rw-r--r--server/helpers/youtube-dl.ts5
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 => {