>>3057518Dude, first extract your video into frames:
ffmpeg -i "input.mkv" -vf fps=24000/1001 -qscale:v 2 -format png -ss 09:17.447 -to 09:35.440 -f image2 screen/%05d.png
Move the needed frames to a separate folder, name them 00000.png, 00001.png etc. (I do this with code)
Then reassemble back into video:
ffmpeg -framerate 24000/1001 -i screen1/%05d.png -vf "format=yuv420p" -r 24000/1001 -threads 8 -c:v h264 -crf 16 -tune animation -y output.v-2816-crf-16.mp4
Or into a GIF:
ffmpeg -framerate 24000/1001 -i screen1/%05d.png -vf "scale=-1:360:flags=lanczos,palettegen" -r 12 -threads 8 -tune animation -y palette.png
ffmpeg -framerate 24000/1001 -i screen1/%05d.png -i palette.png -filter_complex "scale=-1:360:flags=lanczos[x];[x][1:v]paletteuse" -r 12 -threads 8 -tune animation -y output.12fps.gif