Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes an escaping issue and makes a better use of the ffmpeg.bin variable #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions lib/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*********************/
Expand Down Expand Up @@ -551,12 +551,8 @@ 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<inputs.length; i++) {
inputs[i] = '\'' + inputs[i] + '\'';
}
// 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('') + '"' : [])
Expand Down