![](https://secure.gravatar.com/avatar/c454c7402b3c58eaddc7622147742a81.jpg?s=120&d=mm&r=g)
21 Dec
2012
21 Dec
'12
5:56 a.m.
How did you produce a video out of the PDF?
I wrote a BASH script to automate this process, but essentially it involves converting each "frame"/page of the PDF to JPG and then combining the JPG sequence into a MP4 movie. The hypocycloid example has 191 frames, and so I did something like: let n=0; while [ $n -lt 191 ] do convert -density 720 hypocycloid.pdf[$n] -resize "x720" -flatten -gravity center -extent "1280x720" -quality 100 hypocycloid-$n.jpg done ffmpeg -r 13 -i hypocycloid-%d.jpg -b 5000k -vcodec libx264 -y hypocycloid.mp4