![]() Skip the first 10 seconds of the video and make a 5 second gifĪdd -ss 10 and -t 5 to the ffmpeg command. So if you want 10 sec movie with frame rate 30/sec, you make GIF animation that has total 300 frames, then. - layers Optimize - : optimizes the resulting gif greatly reduces file size especially if the frames have a lot of similar images (e.g. Add -r 30 to specify the frame rate 30 frames/sec.You can change this with the -framerate input option. -delay : specify the pause between frames I make this equal to -r option in ffmpeg This is easy with ffmpeg: ffmpeg-framerate 24 -i input.264 -c copy simply stream copies (re-muxes) the video so there is no unnecessary re-encoding occurring therefore the quality is preserved and the whole process is quick.Frame rate is by default assumed to be 25. ![]() -vf scale=n:-1:flags=lanczos : I add this to the ffmpeg command when I want to force the gif to be a different resolution than the source video while keeping the quality high, n = frame width.-r : set the frame rate I make this equal to -delay option in convert.-t : duration specify the length of gif to create.-ss : start time offset specify the time of the video to start extracting the frames/creating the gif.You can check the help or man pages of ffmpeg and convert for more details about the available options but here are a few that I’ve found to be the most useful. Ffmpeg -i -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 -layers Optimize.
0 Comments
Leave a Reply. |