File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ export async function getScryptedFFmpegPath(): Promise<string> {
13
13
return f ;
14
14
}
15
15
16
+ // strange behavior on synology and possibly unraid
17
+ // where environment variables are not necessarily kept
18
+ // in their container manager thing.
19
+ // so even if the Dockerfile sets SCRYPTED_FFMPEG_PATH,
20
+ // it is not gauranteed to be present in the environment.
21
+ // this causes issues with @scrypted /ffmpeg-static,
22
+ // which looks at that environment variable at build time
23
+ // to determine whether to install ffmpeg.
24
+
16
25
// try to get the ffmpeg path from a variable
17
26
// ie:
18
27
// export SCRYPTED_FFMPEG_PATH=/usr/local/bin/ffmpeg
@@ -21,5 +30,8 @@ export async function getScryptedFFmpegPath(): Promise<string> {
21
30
return f ;
22
31
23
32
const defaultPath = os . platform ( ) === 'win32' ? 'ffmpeg.exe' : 'ffmpeg' ;
24
- return getFfmpegPath ( ) || defaultPath ;
33
+ const scryptedFfmpegStatic = getFfmpegPath ( ) ;
34
+ if ( scryptedFfmpegStatic && fs . existsSync ( scryptedFfmpegStatic ) )
35
+ return scryptedFfmpegStatic ;
36
+ return defaultPath ;
25
37
}
You can’t perform that action at this time.
0 commit comments