The same scripts will output videos for HTML5 if you replace the `to_gif` method by `to_videofile`:
clip.to_videofile('animation.mp4')
clip.to_videofile('animation.webm', codec='libvpx')
clip.to_videofile('animation.ogv',codec='libtheora')