Skip to content

Commit

Permalink
Add start and end time for GIF palette generation (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
topalavlad authored and sindresorhus committed Jul 31, 2019
1 parent c0f357a commit 44d9a0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ const convertToApng = opts => {
const convertToGif = PCancelable.fn(async (opts, onCancel) => {
const palettePath = tmp.tmpNameSync({postfix: '.png'});
const paletteProcessor = execa(ffmpegPath, [
'-ss', opts.startTime,
'-to', opts.endTime,
'-i', opts.inputPath,
'-vf', `fps=${opts.fps},scale=${opts.width}:${opts.height}:flags=lanczos,palettegen`,
palettePath
Expand Down

0 comments on commit 44d9a0d

Please sign in to comment.