The plcx file needs to be opened read only, when the rendering dialog is opened.
The window with the exporting dialog has an “abort” button. This button needs to have the “focus” activated, so that you are able to hit the button with enter.
Then the rendering has to be cut in smaller pieces, to not hold all of the memory of the system. maybe only 10 or 20 pictures at once and assembly of them later. I have almost 4 Gigabytes of RAM and i have issues with a movie that has has only 450 pictures in it.
I agree that Pencil2D should handle modifications while there is an active export better. And the simplest solution to that would be to disable all modifications while exporting.
In my testing, the Cancel/Abort button receives focus when the export starts. This is true for 0.6.6 and the latest nightly build, but the behavior could differ based on your operating system. What version of Pencil2D and what OS are you using that does not set focus to the button when the export starts?
As for exporting memory usage, that differs significantly depending no whether you are exporting an animated GIF or a movie.
The GIF export renders all the frames to memory before generating the GIF for technical reasons. To do it any other way would require double the rendering time, so it was decided this was an acceptable trade-off given that GIFs should only be used for small animations anyway.
The movie export already uses a sliding window to limit the amount of rendered frames in memory at any given time. This window targets a maximum usage of 1GB of memory. This does not include the memory required to render the video which could be several hundred MB and which we have absolutely no control over. The 1GB target is not currently configurable. Cutting up the video would not offer any advantage over this approach, and would reduce encoding efficiency and speed.
Unfortunately 4GB is not a lot of RAM for a system these days, particularly when much of that will be used up by your operating system and other open programs. Perhaps at some point there will be more export options to allow for lower memory exports, but I cannot say when or if that will happen.
I had a nightly build in use and did not notice, that the focus was activated, because the computer was at about 66% of the file and almost completly unresposive. All Memory was in use, no swapping available (deactivated) and the usage of the cpus was at about 40% both. There was no alternative to a switch off. Linux Peppermintos
I had tried to render a movie *.mp4
Totally agree with you, that a gif could be handled differently to a bigger movie.
I think the OS does not use more than 700 MB of RAM, so there should be 3 Gigs of RAM for computing left. I hope there will be a kind of batch processing of movies in the future. At least in the command line.
My first PC was a 386 sx 33 Mhz with 64 MB of RAM and windows 3.11
Maybe i could just export all pictures in one subfolder, and then use FFmpeg to assemble them externally. I just dont want to freeze my computer over and over again. Maybe this would be the best solution for movies over 300 frames.
Time is not important for me. Even when rendering needs 1 second per frame would be okay for me. I have to try how to use FFmpeg on the command line to assemble a movie from single pictures and a sound file.
Well since you’ve already built Pencil2D from source previously, what you can do is modify the source to reduce the size of the sliding window. Go to core_lib/src/movieexporter.cpp and change this line:
int frameWindow = static_cast<int>(1e9 / (camSize.width() * camSize.height() * 4.0));
int frameWindow = 1;
And then rebuild the program. This will use the minimal amount of memory possible for exporting movies. You may try increasing the number slightly if the export freezes (theoretically it shouldn’t), or if you want to get better performance at the cost of more memory.
okay, i have build it anew. It looks very good so far.
Development Build Jul 23 2023
Operating System: PeppermintOS
CPU Architecture: x86_64
Qt Version: 5.15.8
EDIT: I have exported a bigger file and just for fun, i hit enter to interrupt the process. Hit enter once, twice… still no change. Then i hit space. This at least had a visible effect on the button, but the process was not interrupted. Then i tried Esc and finally the rendering ended, but the computer was still a bit unrespronsive, because the memory was still clogged by the process.
Then i hit Alt + F4 to leave the program. This worked and the memory was released.
Exporting a movie with 530 frames to 800x600 pixels with 3.8GB of RAM is still possible.
Changing the output to 1280x720 pixels is working, too!!! I am sooo happy!
Exporting a movie with 800 frames to 540x480 pixels is possible too.
But there are issues:
[W][10233.939313] pw.conf | [ conf.c: 939 try_load_conf()] can’t load config client.conf: No such file or directory
[E][10233.939873] pw.conf | [ conf.c: 963 pw_conf_load_conf_for_context()] can’t load default config client.conf: No such file or directory