- let inputVideoFile = null
- if (videoInputPath == null) {
- inputVideoFile = video.getOriginalFile()
- videoInputPath = join(videosDirectory, video.getVideoFilename(inputVideoFile))
- } else {
- inputVideoFile = basename(videoInputPath)
- }
+
+ const inputVideoFile = inputVideoFileArg ? inputVideoFileArg : video.getOriginalFile()
+ const videoInputPath = join(videosDirectory, video.getVideoFilename(inputVideoFile))