olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
8.01k stars 543 forks source link

[EXPORT] Extremely long export times with 4K input and output #2253

Open unfa opened 1 year ago

unfa commented 1 year ago

Commit Hash

1687a721

Platform

Arch Linux KDE X11

CPU: Ryzen 9 3900X GPU: Radeon RX 6800XT

Summary

1 hour 4K 60FPS video with no visual effects used takes 14 hours to render.

Additional Information / Output

I was ready for it to take 2, maybe 4 hours. The actual render time however makes me question viability of using Olive 0.2 for long-form 4K video authoring until this can be fixed.

Olive did not use 100% of my system's resources during this time. In the first 4 hours it did use a lot of CPU and in short bursts a lot of GPU processing. Within the first 2 hours it reached ~45% on the export progress bar ( I use the "render in background" option so I can move Olive 's window around and not have it stuck with the export dialog on top.

I thought 4 hours should suffice, that'd be ~25% realtime which I guess would be ok. Needless to say my system can stream the source video without issues in realtime or sped up using MPV.

It seems like something makes Olive waste a lot of time waiting for something. And the problem seems to get exponentially worse with longer videos and higher input/output resolution.

Here's the project file (without media obviously), so you can see what is being done here. 01.zip

All I'm doing is trimming start and end and adding a 2nd audio track, with a couple audio cuts and a fade to/from black on video.

@itsmattkc I can share the source media privately for testing, if you'd be interested in reproducing this locally on your side.

Avispa commented 1 year ago

I kinda can confirm this, though I did no "testing" on it. However a downscale/zoom on a 1080p to 360p of 3 minutes of length takes about an hour on an i7-8550u.

More importantly I also noticed that Olive just utilizes about ~40-50% of my CPU though GPU (sometimes) gets heavy bursts.

mcDandy commented 1 year ago

I remember having this problém. Around 30-35 hours on 23 minutes, but I have used hvec on setting Slower (i did switch audio track. Input Is 4k h264). I have Intel core I7 8750H

unfa commented 1 year ago

From my observation as time went on Olive was idling more and more. Initially I've seen pretty consistent CPU load and more or less consistent GPU load. Ideally I'd see both at 100% load from start to end of the export - that'd mean my hardware was utilized to the max. Obviously we're always going to be bottlenecked somewhere, so GPU might idle a bit to wait for the CPU to catch up or vice versa, though Olive 0.1 was really good at this. It manage to often provide me with near 100% CPU and GPU load and it rendered reasonably fast. For sure faster than anything else in the FOSS video editing space when using comparable visual effects. Olive 0.2 seems to struggle with this a lot so far.