diff --git a/.project b/.project new file mode 100644 index 0000000..c9de1fe --- /dev/null +++ b/.project @@ -0,0 +1,12 @@ + + + node-ffmpeg + + + + + + + org.nodeclipse.ui.NodeNature + + diff --git a/lib/ffmpeg.js b/lib/ffmpeg.js index e5e99e9..c5e1bfb 100644 --- a/lib/ffmpeg.js +++ b/lib/ffmpeg.js @@ -196,10 +196,10 @@ var ffmpeg = function (/* inputFilepath, settings, callback */) { throw errors.renderError('input_filepath_must_be_string'); // Get the input filepath var inputFilepath = args[0]; - // Check if file exist - if (!fs.existsSync(inputFilepath)) - throw errors.renderError('fileinput_not_exist'); - + //Check if the input is an external URI + //or is an existing file + if (!/["]?[a-zA-Z0-9\-\.\-:_]+:\/\/[a-zA-Z0-9\.\/\-:_]+(\s[a-zA-Z0-9\-_]+=[a-zA-Z0-9\-_]+)?["]?$/.test(inputFilepath) && !fs.existsSync(inputFilepath)) + throw errors.renderError('fileinput_not_exist'); // New instance of the base configuration var settings = new configs(); // Callback to call