Video exporting by calling FFMPEG externally #980
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.