Skip to content
This repository has been archived by the owner. It is now read-only.
Example to creating animation movie by ffmpeg
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
1.jpeg
2.jpeg
3.jpeg
4.jpeg
5.jpeg
LICENSE
README.md
input.txt
make.sh
out.gif
out.mp4

README.md

Example to create animation movie by ffmpeg

Animated gif is an de-facto standard format to embed animation in the web, however, it can handle just 256 colors(!), and compression rate is not so good.

This repository describe how to create animation movies from stil pictures with ffmpeg.

out.mp4 is the result example.

input.txt

Here is an input:

file '1.jpeg'
duration 1
file '2.jpeg'
duration 0.25
file '3.jpeg'
duration 0.25
file '4.jpeg'
duration 0.25
file '5.jpeg'
duration 3
file '5.jpeg'

duration 0.25 means "0.25sec".

note that last file '5.jpeg' appears twice to display 5.jpeg 3 sec in last.

make.sh

ffmpeg -f concat -i input.txt -vf "scale=-1:1024" -vcodec libx264 -pix_fmt yuv420p -r 30 out.mp4

Result

out.mp4

You can see also in here.

License

All images are by @ledyba and @momiji-san.

Licensed under CC-BY-SA 4.0.

You can’t perform that action at this time.