Kdenlive render crash - AVStream codec warning

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
corkie
Level 1
Level 1
Posts: 34
Joined: Tue Aug 14, 2018 2:01 pm

Kdenlive render crash - AVStream codec warning

Post by corkie »

I see a lot of people talking about this across the web so I thought I would offer this solution

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
This warning is being blamed as the cause of the crash. In my case it wasn't.

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

Code: Select all

sudo swapoff /swapfile
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 fallocate -l 20G /swapfile
Now mark the file as swap space again:

Code: Select all

sudo mkswap /swapfile
And turn the swap on again:

Code: Select all

sudo swapon /swapfile
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.

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
baconneggs
Level 1
Level 1
Posts: 15
Joined: Sun Dec 27, 2020 7:41 pm

Re: Kdenlive render crash - AVStream codec warning

Post by baconneggs »

Just want to thank you for the post here. No doubt saved me hours.
Locked

Return to “Software & Applications”