From 5bb5276d6f30a331898ded7fa70da99a9c78f1bb Mon Sep 17 00:00:00 2001 From: Nicolas Badia Date: Fri, 22 Jun 2018 08:49:03 +0200 Subject: [PATCH 1/3] Do not manually escape inputs as it is aleardy done The escaping is done 2 line below by addQuotes --- lib/video.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/video.js b/lib/video.js index 903efdb..fe9fa7c 100644 --- a/lib/video.js +++ b/lib/video.js @@ -551,10 +551,6 @@ module.exports = function (filePath, settings, infoConfiguration, infoFile) { var onlyDestinationFile = folder != undefined ? false : true; // Building the value for return value. Check if the callback is not a function. In this case will created a new instance of the deferred class var deferred = typeof callback != 'function' ? when.defer() : { promise : null }; - // Deal with input paths that have spaces in them, by quoting them - for (i=0; i Date: Fri, 22 Jun 2018 08:49:05 +0200 Subject: [PATCH 2/3] Makes use of the ffmpeg.bin variable in execCommand --- lib/video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/video.js b/lib/video.js index fe9fa7c..e09784b 100644 --- a/lib/video.js +++ b/lib/video.js @@ -552,7 +552,7 @@ module.exports = function (filePath, settings, infoConfiguration, infoFile) { // Building the value for return value. Check if the callback is not a function. In this case will created a new instance of the deferred class var deferred = typeof callback != 'function' ? when.defer() : { promise : null }; // Create a copy of the commands list - var finalCommands = ['ffmpeg -i'] + var finalCommands = [ffmpeg.bin, '-i'] .concat(inputs.map(utils.addQuotes).join(' -i ')) .concat(commands.join(' ')) .concat(filtersComlpex.length > 0 ? ['-filter_complex "'].concat(filtersComlpex.join(', ')).join('') + '"' : []) From 2baf95a85daa4ba38fafa2b9bf1a84d9cc73000a Mon Sep 17 00:00:00 2001 From: Nicolas Badia Date: Thu, 28 Jun 2018 16:55:37 +0200 Subject: [PATCH 3/3] Quote the output path --- lib/video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/video.js b/lib/video.js index e09784b..f5130b1 100644 --- a/lib/video.js +++ b/lib/video.js @@ -59,7 +59,7 @@ module.exports = function (filePath, settings, infoConfiguration, infoFile) { * Set the output path */ var setOutput = function (path) { - output = path; + output = utils.addQuotes(path); } /*********************/