Skip to content

Commit

Permalink
Move -vframes flag to proper place in command
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan May authored and vdemedes committed Apr 25, 2016
1 parent 8d6d98e commit 186ebf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/video-thumb.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ exec = require('child_process').exec

module.exports =
extract: (path, destPath, time = '00:00:01', size = '200x125', callback) ->
exec 'ffmpeg -ss ' + time + ' -vframes 1 -i ' + path + ' -y -s ' + size.replace('x', '*') + ' -f image2 ' + destPath, ->
callback() if callback
exec 'ffmpeg -ss ' + time + ' -i ' + path + ' -y -s ' + size + ' -vframes 1 -f image2 ' + destPath, ->
callback(err) if callback
6 changes: 3 additions & 3 deletions lib/video-thumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ module.exports = {
if (size == null) {
size = '200x125';
}
return exec('ffmpeg -ss ' + time + ' -vframes 1 -i ' + path + ' -y -s ' + size.replace('x', '*') + ' -f image2 ' + destPath, function() {
return exec('ffmpeg -ss ' + time + ' -i ' + path + ' -y -s ' + size + ' -vframes 1 -f image2 ' + destPath, function( err ) {
if (callback) {
return callback();
return callback( err );
}
});
}
};
};

0 comments on commit 186ebf0

Please sign in to comment.