Modularize path.lua into basename.lua and directory.lua
Ambrevar opened this issue · 3 comments
As mentioned here, it would give more flexibility to the user.
path.lua would remain for backward compatibility and simply enable the other two.
Note that my path.lua
does more than simply enable basename.lua
and directory.lua
—it also deals with the output file extension (including setting it to any override value provided by the user), and takes care of the weird ffmpeg mp4 subformat behavior (you probably don't want an audio file with a mov
extension, for example)
In fact, in my setup, if path.lua
is not run, then neither of the other two path-related scripts will have an effect. path.lua
is the master script for determining the output path; basename.lua
and directory.lua
are toggleable. You would only disable path.lua
if you wanted to ensure that the operation was in-place (since the default for output.path
is input.path
).
it also deals with the output file extension (including setting it to any override value provided by the user), and takes care of the weird ffmpeg mp4 subformat behavior (you probably don't want an audio file with a mov extension, for example)
Why not moving this to basename.lua
?
Why not moving this to basename.lua?
Because, while I admit that the word "basename" means "the file path minus the directory", and thus includes the extension, I think that generally users want the correct file extension on their files; or, if they don't, it's not related to their desires about the rest of the basename. Basically, I want people to be able to disable basename
without preventing the correct extension from being set.