projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c471063
)
Use custom ffmpeg path in youtube dl
author
Chocobozzz
<me@florianbigard.com>
Wed, 3 Apr 2019 08:16:18 +0000
(10:16 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Wed, 3 Apr 2019 08:16:18 +0000
(10:16 +0200)
server/helpers/youtube-dl.ts
patch
|
blob
|
history
diff --git
a/server/helpers/youtube-dl.ts
b/server/helpers/youtube-dl.ts
index 782dd2e2e194dde892a4a73ec21493a4cc5eeb05..c188739ffca84d4ab0febef40b0238e41485cb8b 100644
(file)
--- a/
server/helpers/youtube-dl.ts
+++ b/
server/helpers/youtube-dl.ts
@@
-48,6
+48,11
@@
function downloadYoutubeDLVideo (url: string, timeout: number) {
const options = [ '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best', '-o', path ]
+ if (process.env.FFMPEG_PATH) {
+ options.push('--ffmpeg-location')
+ options.push(process.env.FFMPEG_PATH)
+ }
+
return new Promise<string>(async (res, rej) => {
const youtubeDL = await safeGetYoutubeDL()
youtubeDL.exec(url, options, processOptions, err => {