How to batch-generate whiteboard videos with Python and ffmpeg
Use Editor de Vídeo Online's advanced Python version to batch-render hand-drawing videos at exactly 30 fps, with configurable hand, duration and format.

Need 20 hand-drawing videos for a course? Or a week's worth of tip videos? Making them one by one in the browser works, but it takes time because recording is real-time. That is what Editor de Vídeo Online's advanced version is for: a Python script that lets you batch-generate videos at maximum quality and exactly 30 frames per second.
What the advanced version does
- Generates hand-drawing videos from images (that mode only).
- Processes one image or an entire folder at once.
- Exports H.264 MP4 at a fixed 30 fps, independent of a browser tab.
- Lets you set duration, format, sensitivity, brush and hand.
It lives in Editor de Vídeo Online's avancado ("advanced") folder, along with the mao_padrao.png (default hand) and mao_manga.png (sleeve hand) files.
Installation
You need Python and ffmpeg.
Windows
- Install Python from python.org and tick "Add Python to PATH" during setup.
- In a terminal, run
winget install ffmpeg. - In the
avancadofolder, run:
pip install -r dependencias-python.txt
Mac
brew install python ffmpeg
pip3 install -r dependencias-python.txt
Dependencies are opencv-python, scikit-image and numpy.
Basic usage
One drawing:
python gerar_video.py drawing.png
A whole folder (one video per image):
python gerar_video.py folder_with_drawings/
With another hand and a 40-second duration:
python gerar_video.py drawing.png --mao mao_manga.png --duracao 40
All options
The option names are in Portuguese; here is what each one means:
| Option | What it does | Default |
|---|---|---|
--saida (output) | Output .mp4 file (or folder, if the input is a folder) | Next to the image (a videos subfolder for folders) |
--duracao (duration) | Seconds of drawing | 30 |
--final | Seconds holding the finished drawing at the end | 2.5 |
--formato (format) | vertical, horizontal, quadrado (square) or original | vertical |
--limiar (threshold) | Stroke sensitivity, 80 to 240 | 190 |
--pincel (brush) | Brush thickness | 1.0 |
--mao (hand) | Transparent PNG of the hand | mao_padrao.png |
--ponta (tip) | x,y position of the pencil tip in the hand PNG | 0,83 |
--base | Hand width (without arm) in the PNG, in pixels | 275 |
--tamanho (size) | Hand scale | 1.0 |
Full example in landscape format:
python gerar_video.py drawing.png --duracao 40 --formato horizontal --saida my_video.mp4
With your own hand:
python gerar_video.py drawing.png --mao my_hand.png --ponta 0,83 --base 275
To prepare your hand, see how to use your own hand in the animation.
A series production workflow
- Standardize your sketches: same format, same line weight, white background. See how to prepare a sketch.
- Name files in order:
01-intro.png,02-problem.png… - Test one file with different
--limiarand--pincelvalues until it looks right. - Run the whole folder with the same parameters.
- Edit the videos in Editor de Vídeo Online's Studio (with Import video) or your favorite editor.
Browser or Python: when to use each
| Situation | Best option |
|---|---|
| One video, live visual tweaks | Browser |
| Vox collage or Paper effect | Browser |
| Many similar hand-drawing videos | Python |
| Guaranteed exact 30 fps | Python |
| Computer too slow for real-time recording | Python |
Frequently asked questions
Does the Python version make collages?
No. The advanced version is for Hand drawing mode only. Vox collage and Paper effect run in the browser.
Do I need to know how to code?
No. Just run the commands in this guide in a terminal, changing the file names.
Does the video include audio?
No. Add narration and music afterwards in your video editor. See how to add narration and music.
Conclusion
For production at scale, the advanced Python version is the right tool: a folder of sketches goes in, a folder of MP4s comes out. For visual tweaks and other styles, keep using Editor de Vídeo Online in the browser.
Make your animated video now
Editor de Vídeo Online runs in your browser (Chrome or Edge): upload an image, pick a style and record an MP4. Nothing to install.
Try Editor de Vídeo Online →



