Skip to content

Commit 5ec9e7e

Browse files
committed
use size attr for takeScreenshots instead of .size() in thumbnails.js
1 parent d948545 commit 5ec9e7e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/thumbnails.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
var ffmpeg = require('../index');
22

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

0 commit comments

Comments
 (0)