const NodeTerminal = require("child_process").exec;
const { v4: uuidv4 } = require("uuid");
//mini video
NodeTerminal(
`ffmpeg -i input.mp4 -s 320x240 -vf "select='between(t,5,7)+between(t,23,25)+between(t,46,49)',setpts=N/FRAME_RATE/TB" -af "aselect='between(t,5,7)+between(t,23,25)+between(t,46,49)',asetpts=N/SR/TB" -an ${uuidv4()}.mp4`
);
//image thumbnails
NodeTerminal(
`ffmpeg -i input.mp4 -fps_mode vfr -vf "select='isnan(prev_selected_t)+gte(t-prev_selected_t,2)',scale=160:90,tile=7x7" ${uuidv4()}.jpg`
);