Skip to content

Figures

Peter Corke edited this page Jul 2, 2020 · 2 revisions

Placement

Graphics options

command line, args to Simulation

Animation

Converting mp4 to animated gif

GitHub is wonderful but it won't serve mp4 video file which is what bdsim animations can be saved as. To convert them to an animated GIF use:

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

If you want to speed up the movie, change that to

ffmpeg -ss 30 -t 3 -i input.mp4 -vf "setpts=0.25*PTS,fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif

where the number in the -vf option, 0.25, is the reciprocal of the speedup. In this case, the speedup would be x4.

Tip from here.

Saving