1) Get original video http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi 2) Generate videos of X seconds with something like this ffmpeg -i big_buck_bunny_480p_surround-fix.avi -ss 00:01:00 -t 00:00:5 -an bigbuck5s.mp4 ffmpeg -i big_buck_bunny_480p_surround-fix.avi -ss 00:01:00 -t 00:00:20 -an bigbuck20s.webm 3) Then convert the video to a gif image with the script in this directory ./video2gif.sh bigbuck5s.mp4 bigbuck5s.gif 4) And finally convert the gif to an apng with: # sudo apt-get install gif2apng gif2apng file.gif file.png