diff --git a/index.js b/index.js index abb988f..02d7dc6 100644 --- a/index.js +++ b/index.js @@ -194,7 +194,7 @@ ${inject.body || ''} loop: false, autoplay: false, rendererSettings: ${JSON.stringify(rendererSettings)}, - animationData, + animationData }) duration = animation.getDuration() @@ -263,7 +263,7 @@ ${inject.body || ''} let scale = `scale=${width}:-2` if (width % 2 !== 0) { - if (height % 2 !== 0) { + if (height % 2 === 0) { scale = `scale=-2:${height}` } else { scale = `scale=${width + 1}:-2` @@ -286,6 +286,8 @@ ${inject.body || ''} '-an', output ] + console.log(ffmpegArgs.join(' ')) + ffmpeg = spawn(process.env.FFMPEG_PATH || 'ffmpeg', ffmpegArgs) const { stdin, stdout, stderr } = ffmpeg