diff --git a/lib/video.js b/lib/video.js index 903efdb..efddda6 100644 --- a/lib/video.js +++ b/lib/video.js @@ -108,7 +108,7 @@ module.exports = function (filePath, settings, infoConfiguration, infoFile) { */ this.setVideoCodec = function (codec) { // Check if the codec is supported by ffmpeg version - if (this.info_configuration.encode.indexOf(codec) != -1) { + if (this.info_configuration.encode.indexOf(codec) != -1 || codec === "copy") { if (options.video == undefined) options.video = new Object(); // Set the new option @@ -223,7 +223,7 @@ module.exports = function (filePath, settings, infoConfiguration, infoFile) { */ this.setAudioCodec = function (codec) { // Check if the codec is supported by ffmpeg version - if (this.info_configuration.encode.indexOf(codec) != -1) { + if (this.info_configuration.encode.indexOf(codec) != -1 || codec === "copy") { // Check if codec is equal 'MP3' and check if the version of ffmpeg support the libmp3lame function if (codec == 'mp3' && this.info_configuration.modules.indexOf('libmp3lame') != -1) codec = 'libmp3lame'; @@ -552,9 +552,9 @@ 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 }; // Deal with input paths that have spaces in them, by quoting them - for (i=0; i