Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4k 30fps] OOM after 15m while rendering hevc_nvenc profile #1005

Open
Hideman85 opened this issue Jul 13, 2024 · 4 comments
Open

[4k 30fps] OOM after 15m while rendering hevc_nvenc profile #1005

Hideman85 opened this issue Jul 13, 2024 · 4 comments

Comments

@Hideman85
Copy link

Dear all,

I'm posting this here cause I havent found a wiki to discuss about it.

I am running Ubuntu 24.04 (Noble), with kdenlive 23.08.5 for edinting and rendering in command line with melt 7.22.0. My project is 4k 30fps as most of my shoots follow this property.

I am facing huge memory issue (probably memory leaks), the first come with editing in kdenlive after 45min kdenlive have eaten the full of my 32G and have to restart it to work again with it.
Now for rendering, as kdenlive eat all my ram, I do close kdenlive and use rendering scrip with melt command line so melt is free to use the 32G of ram.
Now my project is about 40min and when I do render the project it crash at around 15min with OOM after eating my 32G of ram.
I have plenty of different clips, both videos and images and basic effects like fading, zoom and gaussian bluring. I have some issue to understand why it would lead to OOM since the clips can be unloaded after use.

I am using right now a custom profile

ab=700k acodec=flac channels=2 ar=44100 sample_fmt=s16 color_range=pc f=matroska hwaccel=vaapi hwaccel_output_format=vaapi real_time=-1 threads=0 vaapi_device=/dev/dri/renderD128 vb=70000k vcodec=hevc_nvenc

I am not sure if this is the cause of my OOM, as you can see I removed multi-threading so they do not grow exponentially on their own. My hardware is pretty recent and should follow for this project. (AMD Ryzen 9 7940HS + Nvidia RTX 2070 + 32G LPDDR5x 7400mhz)

I you have any advice to solve my problem or even making myself more efficient, I am welcome and would be very greatful.

@AlxHnr
Copy link

AlxHnr commented Jul 31, 2024

This doesn't seem to be limited to hevc_nvenc. With other codecs, even just lossless, I'm observing similar behavior trough KDEnlive. The memory usage of the melt process just keeps growing and growing linearly, until it gets OOM killed by the kernel. 4k@60hz project here, with memory usage surpassing 52 GB after ~35 minutes of rendering. Memory leakages seem to be a recurring theme when skimming trough previous GitHub issues.

@Hideman85
Copy link
Author

The only solution I found from other topics to work with melt, is to temporarily create a swapfile of 64G, then it works and compile the whole project.

@AlxHnr
Copy link

AlxHnr commented Aug 1, 2024

Or export the video in smaller sections, plus a separate audio file. Then stitch it together with ffmpeg. Has the upside that a small project change won't need a complete rerender.

@Hideman85
Copy link
Author

Yes that is one perspective they want to move to instead of parallel rendering, there is few topics about that already:
https://invent.kde.org/multimedia/kdenlive/-/issues/1868
https://invent.kde.org/multimedia/kdenlive/-/issues/439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants