Skip to content

Commit

Permalink
use size attr for takeScreenshots instead of .size() in thumbnails.js
Browse files Browse the repository at this point in the history
  • Loading branch information
allenkim67 committed Mar 11, 2016
1 parent d948545 commit 5ec9e7e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/thumbnails.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
var ffmpeg = require('../index');

var proc = ffmpeg('/path/to/your_movie.avi')
// set the size of your thumbnails
.size('150x100')
// setup event handlers
.on('filenames', function(filenames) {
console.log('screenshots are ' + filenames.join(', '));
Expand All @@ -13,5 +11,5 @@ var proc = ffmpeg('/path/to/your_movie.avi')
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
// take 2 screenshots at predefined timemarks
.takeScreenshots({ count: 2, timemarks: [ '00:00:02.000', '6' ] }, '/path/to/thumbnail/folder');
// take 2 screenshots at predefined timemarks and size
.takeScreenshots({ count: 2, timemarks: [ '00:00:02.000', '6' ], size: '150x100' }, '/path/to/thumbnail/folder');

0 comments on commit 5ec9e7e

Please sign in to comment.