Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>node-ffmpeg</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>org.nodeclipse.ui.NodeNature</nature>
</natures>
</projectDescription>
8 changes: 4 additions & 4 deletions lib/ffmpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down