Overwrite any exported frame by adding -y flag to the ffmpeg command.
This commit is contained in:
parent
1d993b85d3
commit
ad97086bf0
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue