Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video exporting by calling FFMPEG externally #980

Merged

Conversation

OverloadedOrama
Copy link
Member

@OverloadedOrama OverloadedOrama commented Jan 22, 2024

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):

  • Perhaps it might be a good idea to use FFMPEG for gif and apng exporting as well, as it is a lot faster than using GDScript.
  • The ability to use FFMPEG to create videos from the recorder panel.
  • Allow users to change the video codecs used for each container.
  • Use FFMPEG to import videos and gif files as individual frames.

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.

@OverloadedOrama OverloadedOrama merged commit 43d241a into Orama-Interactive:master Jan 24, 2024
4 checks passed
@OverloadedOrama OverloadedOrama deleted the video-exporting branch January 24, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant