Overwrite any exported frame by adding -y flag to the ffmpeg command.

This commit is contained in:
mmcwilliams 2019-03-18 18:28:31 -04:00
parent 1d993b85d3
commit ad97086bf0
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ async function frame (state, light) {
tmpoutput = path.join(TMPDIR, `export-${padded}.${ext}`);
cmd = `ffmpeg -i "${video}" -vf "select='gte(n\\,${frame})',scale=${w}:${h}" -vframes 1 -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"`;
cmd = `ffmpeg -y -i "${video}" -vf "select='gte(n\\,${frame})',scale=${w}:${h}" -vframes 1 -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"`;
cmd2 = `convert "${tmpoutput}" -resize ${w}x${h} -size ${w}x${h} xc:"rgb(${rgb[0]},${rgb[1]},${rgb[2]})" +swap -compose Darken -composite "${tmpoutput}"`;
//ffmpeg -i "${video}" -ss 00:00:07.000 -vframes 1 "export-${time}.jpg"