Skip to content

Commit

Permalink
Add command to make animated gifs.
Browse files Browse the repository at this point in the history
  • Loading branch information
skytreader committed Jul 13, 2021
1 parent 7e0222f commit 30870e4
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tildocs/ffmpeg-wonder.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,24 @@ ffmpeg -i file.webp file.jpg

---

Compile a bunch of JPEGs to a slideshow movie:
Compile a bunch of JPEGs to a slideshow movie

```
ffmpeg -framerate 2 -pattern_type glob -i "DSC*.JPG" -c:v libx264 -vf "fps=25,format=yuv420p" out.mp4
```

---

[Convert a video file to an animated GIF](https://superuser.com/a/556031/309635)

```
ffmpeg -ss 383 -t 15 -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
```

`-ss` means the timestamp in the video to start cutting, in seconds.

`-t` is the length of the clip to cut. So this example cuts 15 seconds from the
`383` second timestamp.

`-loop` is a weird parameter. Check the link. But this one sets an infinite
loop.

0 comments on commit 30870e4

Please sign in to comment.