Saving large videos
MauriceMeilleur last edited by gferreira
This is an extension of this Twitter thread.
I'm writing animation code that generates many thousands of frames (50,000+). I haven't had the time to methodically test the limit, but a certain number of frames I exceed the capacity of whatever DrawBot is using to generate animated .gifs, .mp4s, .movs.
So I got it into my head to try saving each frame into a multipage .pdf and using imagemagick to convert to video. But the swapfile gets so large that I run out of disk space.
@justvanrossum suggested saving from DB as multiple .pngs and using ffmpeg, which for some reason I can't seem to get to run from the command-line (probably installed it in the wrong place?).
On Twitter @frederik suggested using DB's 'internal mp4 callback', and Just added:
drawBot.context.tools.mp4Tools.generateMP4(). The imageTemplate argument should be something like "path/to/images/myimage%d.png"
This is obviously different than saving to mp4 with saveImage(), right? Which is one of the methods that seems to exceed DB's capacity.
So, how would I add what Frederik and Just are suggesting to my code?
Apologies in advance if this is really a simple question, but I hope someone will indulge me.
MauriceMeilleur last edited by
Looks like Just is giving me at least some of the answer on another thread …
justvanrossum last edited by
@mauricemeilleur Right, sorry, I didn't notice that earlier thread before. http://forum.drawbot.com/topic/36/drawbot-on-something-more-powerful-than-desktops-and-laptops