Project with too many clips freezes

People, I have a video project that up to yesterday was behaving well despite being very large (more 700 clips split into 2 segments).
Unfortunately yesterday I copied the clips from segment #2 to the end of segment #1 (that was to avoid a crash when I was creating a “main” segment that included 1 and 2). Since that, the project won’t open right. I have 16GB of memory which get maxed out a few minutes after loading the project, and nothing works.
I’m wondering whether there’s a way to fix that. For example, a way to split the project into two so the memory does not get maxed out…
I made a backup of the project (using git) a while back but I would lose quite a bit of work if I reverted to that, would love to avoid that…

What version and build are you using?

The last few releases have improved on this immensely…

Sorry I should have been more specific about this. I’m using the latest: 24.05.1 and that’s on windows. I tried it on my mac which has more memory, with the same issue.
I made progress yesterday by editing the .kdenlive file to point the root directory to a bogus directory so the clips could not be loaded. This allowed me to cut the project in two halves. It’s still not working well but at least it’s not crashing out of memory.

After moving the project to the mac with more memory, I was able to reconnect the videos and now both halves work well. Pfiuu. Catastrophe averted. But it seems to me that I’ll have to be very careful with large projects in the future.

The current project I’m working on is probably a similar scale, just over 600 clips so far imported, at present split over 4 sequences - and I do have a lot of Memory, but the newer releases have been getting much better at only using it for the parts of the project you are actively working on. I was definitely hitting the limits of older versions to even continue opening projects like that, but now they’re quite usable again.

It uses “very little” memory when I first open the project, and only really starts to bloat up more if I’m scrubbing through a lot of the ‘already completed’ parts of it again. So I’d have thought you might get away with 16GB, but apparently not.

It should be better if you can keep your scenes split into sequences, so it’s worth trying to find a minimal case that can reproduce the crash you had trouble with and reporting that so it can get fixed.

I have the same experience as you. My trouble started when I created the main sequence that joined the two separate sequences I had. That created an instant crash (when placing sequence 2 on main sequence). Then troubles continued when I appended sequence 2 at the end of sequence 1. So this fits with your experience, now that the two sequences are appended on the same timeline, you have a good chance of running out of memory.
Not easy to report this type of crash cause you’d need all the clips to reproduce it…

I’m not seeing the same problem that you are though …

In my current project the sequences are all separate “chapters” intended to be rendered separately, not scenes intended to be combined - but I just ran a quick test, creating a 5th sequence, and dropping all the other 4 into it to create a single ~5hr long sequence, and in my case that seemed to work just fine. The amount of resident memory kdenlive needed for that didn’t even increase greatly …

So it would seem to be something very specific to your project, not a generic “problem with large sequences”, and if you can identify exactly what that special something is, then there’s both a better chance of it getting fixed, and a chance that you can avoid doing that to solve it immediately in this project for you.

If you’ve got time to poke at it, I’d start from your original 2 sequence state, then begin deleting parts of each sequence until you’re able to combine them without a crash. Chances are you’ll be able to prune it down to just a couple of “offending” clips and/or effects and get a better idea of what the real problem might be in this case.

If you can do that, and others can then reproduce it from that characterisation, we have the basis for a useful bug report and a good chance of getting it fixed.

edit: hmm, it is also possible that it did give you a real OOM crash on the original machine if you were already very near its limits, so it’s probably worth trying again on the new machine too, to see if it still happens on that one …

Good advice. One thing I need to specify: my project uses clips that have high bit rates (around 20Mbps, 1080p I believe), AND variable bit rate which kdenlive advises against. So this could be part of the problem …

My raw footage is 4k, and much of it with average bitrates over 100Mb/s, so I don’t think that’s your problem :slight_smile: And all of that is VBR.

Variable bitrate is perfectly fine, that’s the norm for almost all video and audio these days, it’s just variable frame rate that kdenlive doesn’t handle. But it’s not a problem in your case either, since it won’t let you add variable frame rate video to the timeline, it will prompt you to transcode it to a fixed frame rate format first.

If you’ve got mixed rate / mixed resolution clips that might be contributing … but in the “ordinary” cases they can trigger some rendering quirks but shouldn’t on their own cause a crash.

Oh wow, thanks for the clarification!!! That’s really good info. I have another large project I’m going to start working on. I’ll make checkpoints regularly (I use git for that on the .kdenlive file, which works quite well) and report if I re-run into the issue.
Oh and you’re right, my video files come from 2 devices and don’t all have the same frame rates.