Export failing on 2.5 hour project with 8 video tracks

My project is progressing well. Even if the PC sometimes jerks, it copes quite well with the 7 video tracks as proxies.
However, rendering is difficult. The output format will be 1080p30. 4 of the original tracks are 4k, the rest are 1920*1080. The video is supposed to be 2.5 hours long, but today I wanted to render the first 20 minutes as a test. But the program crashes regularly.
Yadif is set to “Best quality”. Interpolation is also set to “Best”. Under “codec” I have only set quality to 65.
I realize that it can take a long time. But I don’t know why Shotcut crashes.
I don’t want to accept any major losses in quality, as the source material is in excellent quality and the finished video should also look good with a projector.
Does anyone have any advice on what I could do differently?

1 Like

Shotcut itself is crashing during the export process?

We often get reports here of the export failing - usually because the export process crashed. But I do not think we ever hear about the Shotcut application crashing due to export.

After you start the export job, you can actually close the project in Shotcut. But do you keep working on the project? Maybe that is causing the crash.

Another idea is to monitor your computer memory utilization during the export. Maybe your memory resources are being exhausted.

Thank you for your answer.
The program actually only froze once, but the export was aborted four times, each time at a different percentage (8, 12, 5 etc.).
Half an hour ago, an export was finally completed - strangely enough, of the complete first half of the concert (74 minutes). Previously, I had only ever marked the first 20 minutes with a marker for export. This always resulted in crashes. The last two times also when I simply applied the settings for H264 high profile.
Thanks for the tip that I can close the project when the rendering is running. I didn’t know that. I’m not working on it in parallel either (my computer wouldn’t be able to handle that).

Regarding the quality: I did some tests two weeks ago where I set Quality to 100% in addition to the settings yadif best and Interpolation best. I could already see a clear difference to the 55 % with Interpolation good. I would therefore like to apply this to the entire project, but I don’t know whether it was due to the quality setting or the value for interpolation.

The project has just crashed again (a 9%). With the area between the markers and no changes to the high profile.
However, I hadn’t closed the project yet either…
But can it be due to the markers?

Even with a 3-minute-part the export is slow. The CPU is at 40 to 45 %, the ram at 70 %.

OK. Shotcut is not crashing. I fixed the title for you.

Your problem is common. Have you looked at the documentation?

The first step is to right click on the failed job and look at the log.

Even several restarts did not help. The export could never be completed, but always at different points.

I have looked at the documentation. Thank you for that.

Ich hänge mal eine Log-Datei an. Der Fehlercode am Schluss war immer derselbe.
Faillog.txt (18.0 KB)

What I don’t understand is why Shotcut once rendered the entire project two hours ago and now can’t even manage 3 minutes.
Maybe it’s because there are too many tracks. But putting them together now would be too time-consuming.

The log says this:

[filter swscale] sws_scale_frame failed with -12 (Cannot allocate memory)
[filter swscale] Cannot allocate output frame buffer
[filter avfilter.hue] Cannot get in frame buffer
Failed with exit code -1073741819
Failed with exit code -1073741819

You are running out of memory. Did you monitor your computer memory utilization like I suggested? There is common advice on this forum that it can be good to close all other applications when performing an export.

During export, the memory utilization will steadily climb until it eventually levels off until the end of the export job. It is possible that you have exposed a memory leak in Shotcut. If that is the case, you will see that the memory steadily climbs and never levels off. That can result in all of the memory being exhausted. If that is the case, you might need to systematically subtract features from your project until you get it to export without consuming all the memory. Then, we can focus on what feature was removed that used all the memory.

Can you provide your system specifications and check what memory is used during export?

The RAM climbs to 85 per cent and then stops at some point.
I haven’t opened any other apps. But the project is extremely demanding and has many transitions, colour correction, image size changes, etc. It also has 8 video tracks, a track with a black background and an audio track.
When I accidentally exported the entire project earlier, it probably only worked because I had forgotten to switch on two video tracks. I just did a test with only 4 video tracks and it worked straight away. But it would be incredibly time-consuming to drag all the camera tracks onto one track afterwards. Especially as they all have a different colour correction. I could only do this if I applied the colour correction directly to the video stream itself and not just to the track.
Do you think it would help to install a graphics card so that I can use the hardware acceleration?

I will deliver the computer specifications tomorrow. It’s half past three in the morning here in Germany and I’m lying in bed by now :wink:
But thanks for your help in any case.

For each video track that is in a project, Shotcut consumes more memory. So reducing the number of tracks could be a good solution. Even if you could reduce it by one track, that might tip the scale in your favor.

I think that is unlikely to help. Could you add more RAM to your computer?

Thanks for the advice.
I’ve made a few more attempts, including hiding a track. The three-minute test file was then imported correctly. However, I had also switched on the hardware encoder for this. So I didn’t really know, what the reason was, that it now worked.
Three further tests, for each of which I had increased the quality (Lanczos: better, then best, quality: 65, then 75), were also successful. In each case with all tracks activated. Duration between 13 and 16 minutes. I think it now works, because hardware encoder is on. But I am not really sure und unsure every time I try to export a project.
I am currently testing importing a 23-minute track. Stands at 4%, remaining time 5:30 hours.

The specifications of my PC are
Processor: 12th Gen Intel i5-1240D
RAM: 16 GB
Win 11 23H2

It’s difficult when the video is so long. Have you tried breaking it up in pieces?

1 Like

Mentioned here (could be found through links already provided or as the first result when searching for “memory”):

I think there are several reasons why it is not working.
I have now merged 4 tracks that contained 4K footage onto one track so that I can hide the four individual tracks when rendering.
The first attempt with a 30-minute piece did not work. I didn’t change anything in the settings for the export. The second attempt is currently running.
I always restart the PC beforehand (I have to anyway).
When I accidentally tried to render the project with the proxies, it would have taken 1.5 hours. However, it went without a hitch.

I have no problems at all when editing. The system runs completely correctly. However, I also work with proxies.
I had also thought about splitting the file into individual parts. But some of the songs in the concert are very long. On average 8 minutes, one even 25.
It would be very disappointing if the project failed because the export didn’t work. Then all the work would have been for nothing.
What I understand least is that the entire 74-minute video was rendered yesterday, although only two tracks with 4K material were (accidentally) switched off. Now I have switched off 4 for rendering. Or does it not matter because the material from these tracks is still included in the project, even if only on one track?
In any case, I don’t know what to do. My PC is probably not powerful enough, even though I only upgraded it 2 months ago.

can we setup to use like 90% or any number below 100% of memory to avoid this memory crash issue ?

In this case (the one with the log), it was not a crash but an exit with failure. It is not clear what you expect by “setup to use… % of memory.” We have already made numerous changes and fixes over the years to reduce memory usage. That is a continual battle just like bugs and features. I do not know how to make something that will let you work with unlimited tracks of unlimited video resolution in a small amount of memory. I guess one could write it to process one pixel at a time if you are willing to wait days or weeks for your export to finish.

1 Like

if you want, I can render your project for you on my computer (64gb of RAM).

That would be great. Thank you very much for your offer :upside_down_face:.
I haven’t finished editing yet. It will take some more days to edit the whole project.
I’ll see tomorrow if I can install more RAM for my PC.
If I can’t manage to export the songs individually and put them together so that there’s no interruption, then I’ll be happy to come back to it.
Many, many thanks.

1 Like

After you mentioned your 64 GB RAM, I invested more money and also ordered 64 GB RAM today. It’s difficult for me financially at the moment, but it’s even more annoying when you don’t know after hours of editing whether your work was in vain because you can’t render it.
I also didn’t know how to get the 500 GB files from Germany to you. That would have been very difficult and time-consuming online. Nevertheless, thank you for your great offer. In two respects: You gave me the idea to upgrade the RAM again.
Now I just hope that the DDR4 modules will fit into the motherboard. But since it’s only 2 months old, it should work :grin:

I meant shotcut check memory use and when get 90% or higher usage Shotcut could auto pause the export till memory get 70% usage or lower then resume to prevent crash or other issues … not sure how difficult it is to code this idea … just an idea !

OK, that is an interesting idea to consider. I have thought about how today there is no way to pause and resume jobs. Also, I have thought about how the low memory warning dialog does not dismiss itself because the problem could go away before the user notices the dialog and takes action.
But this would not be foolproof because low memory checks only occur once a minute, and the memory could consume faster than that and still lead to a memory allocation failure. I guess that is a case of something is better than nothing.

1 Like

Implementation suggestion:

Override the direct memory allocation with try memory allocation with wait loop which tries to allocate the memory all 0.1 seconds if it previously had failed, and abort this after e.g. 5 minutes for the export and 10 seconds for the editing part in the export process.

This strategy is platform independent and it should perform well.