What happens when I export an project as a .MP4 or .GIF file?

Exporting a project from Pencil2D

When producing your master piece, using Pencil2D, at some point you’ll want to share I with the world. The 2 main formats for this are video, as an .MP4 file or animated .GIF file. The difference is .MP4 can include sound and .GIF cannot.

The diagram on the below is how many Pencil2D users think that the file export operation works.

The diagram on the below is what actually happens when you export your project to a .MP4 video file.

The creation and opening of the buffer file uses computer memory.

In some cases it requires more memory than is available in your computer. In these cases the conversion process will pause, whilst the initial data transferred into the buffer is processed and output to the open .MP4 file.

At this point the remaining data will be transferred into ffmpeg and converted and added to the data already in the.MP4 file. The .MP4 file will now be closed and the process is complete.

To some novice users of Pencil2D the pause in the process can be misread as a crash.

Why does Pencil2D use ffmpeg when converting data from internal formats to the desired user formats, for example .MP4? Why reinvent the wheel every time you need to use a wheel? Ffmpeg is a utility, written by the ffmpeg group, who have tested it extensively and maintain it.

A friend of mine, who has a laptop running Windows 11 with 4 Gbytes of memory.

He experienced a 5 sec hiatus in the middle of a Export to .GIF format file. He wasn’t worried, but puzzled. I’ll send him a link to your explanation.

Thanks