Kdenlive goes to render a webm or mp4 project
The render starts off and runs for a while but then It reports a crash in rendering:
The last message in the report is something like this
Code: Select all
Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead
What was happening was the system was using all available RAM and then filling up the Swap file.
The solution is to make the swap space bigger. In my case i have 8GB of RAM and had 2GB of swap space.
After a bit of experimentation I increased the size of the swap file to 20GB.
There is a good tutorial about swap files here and here is the bit that I used to fix my problem:
To see how things are going it is a good idea to run System Monitor while rendering. Open the Resources tab and it will show how busy your cpu is and more importantly show memory and Swap space usage. In Cinnamon you will find System Monitor under Administration in the Menus.Resizing swap space on Linux
There are a couple of ways you can resize the swap space on Linux. But before you see that, you should learn a few things around it.
When you ask your system to stop using a swap file for swap area, it transfers all the data (pages to be precise) back to RAM. So you should have enough free RAM before you swap off.
This is why a good practice is to create and enable another temporary swap file. This way, when you swap off the original swap area, your system will use the temporary swap file. Now you can resize the original swap space. You can manually remove the temporary swap file or leave it as it is and it will be automatically deleted on the next boot.
If you have enough free RAM or if you created a temporary swap space, swapoff your original file.
Now you can use fallocate command to change the size of the file. Let’s say, you change it to 20 GB in size:Code: Select all
sudo swapoff /swapfile
Now mark the file as swap space again:Code: Select all
sudo fallocate -l 20G /swapfile
And turn the swap on again:Code: Select all
sudo mkswap /swapfile
Code: Select all
sudo swapon /swapfile
This is also useful any time Kdenlive is running as it will also crash (use up all your RAM and swap space and freeze without warning) loading large files and files that use multiple transitions.
Here in the Mint world swap files seem to be the standard but some Linux systems have the swap space in its own Hard Disk Partition. Resizing that would be a job for Fdisk and may not be so easy to do because the extra space has to come from somewhere.