Skip to content

Commit 79ee8c8

Browse files
Allows ffmpeg to be a directory
1 parent a940ca8 commit 79ee8c8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Ffmpeg.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ return class.create(function(ffmpeg)
3535
end
3636

3737
function ffmpeg:configure(options)
38-
self.ffmpegPath = options.ffmpeg
38+
local ffDir = File:new(options.ffmpeg)
39+
if ffDir:isDirectory() then
40+
self.ffmpegPath = File:new(ffDir, getExecutableName('ffmpeg')):getPath()
41+
else
42+
self.ffmpegPath = ffDir:getPath()
43+
ffDir = ffDir:getParentFile()
44+
end
3945
if options.ffprobe then
4046
self.ffprobePath = options.ffprobe
4147
else
42-
local ffDir = File:new(self.ffmpegPath):getParentFile()
4348
if ffDir then
4449
self.ffprobePath = File:new(ffDir, getExecutableName('ffprobe')):getPath()
4550
else

0 commit comments

Comments
 (0)