publish: true
docs: https://ffmpeg.org/ffmpeg.html
To convert any file to a GIF using FFmpeg, you can follow these steps:
ffmpeg -version
.ffmpeg -ss 00:01:30 -t 5 -i video.mkv -filter_complex "[0:v] palettegen" palette.png
-ss
: Sets the starting point of the video.-t
: Sets the duration (e.g., 5 seconds).-i
: Specifies the input video file.ffmpeg -ss 00:01:30 -t 5 -i video.mkv -i palette.png -filter_complex "[0:v] fps=10,scale=720:-1 [new];[new][1:v] paletteuse" output.gif
fps
: Specifies the frame rate of the output GIF.scale
: Resizes the video while maintaining aspect ratio.paletteuse
: Applies the custom palette to generate the GIF.