Orama-Interactive / Pixelorama

Unleash your creativity with Pixelorama, a powerful and accessible open-source pixel art multitool. Whether you want to create sprites, tiles, animations, or just express yourself in the language of pixel art, this software will realize your pixel-perfect dreams with a vast toolbox of features. Available on Windows, Linux, macOS and the Web!
https://orama-interactive.itch.io/pixelorama
MIT License
6.46k stars 351 forks source link

Video exporting by calling FFMPEG externally #980

Closed OverloadedOrama closed 5 months ago

OverloadedOrama commented 5 months ago

This PR implements the ability to export projects to video formats (mp4, avi, ogv, mkv & webm) using FFMPEG. FFMPEG itself is NOT bundled in Pixelorama, and thus needs to be downloaded as a stand-alone software. Then, you need to insert the file path of FFMPEG's binary in Pixelorama's preferences. I have only tested it on Linux so far. EDIT: Should also work on Windows. In the future we could look into bundling it with GDExtension, if the licenses are compatible. Otherwise, I suppose it could be in the form of an extension.

It works by saving all of the frames as png files in a temp folder, then FFMPEG is called to convert the png files into a video, taking into account the project's fps and the delay of each individual frame. Then, the temporary png files are being deleted.

Implements #658.

Ideas for the future (outside the scope of this PR):

This feature could work well if we implement audio support in the timeline (#897), allowing people to use Pixelorama as a fully fledged tool to create animations.

3d cube spin 8x.webm

A .webm video exporting directly from Pixelorama.