VEGAS 21 (Build 187) POST Render Error: "The system is low on memory"

SH-1audio wrote on 11/16/2023, 11:18 AM

I just upgraded to Vegas 21 Post- and am now running into an error rendering projects.
The render makes it through 90-97% of the project and then it stops, preview window goes 100% Red, I get the low on memory error and after that, Vegas crashes.

Projects I do are mainly 60 fps mp4 screen recording with voiceover, but extensive masking, zooming and annotations- delivery is YouTube and social media, so AVC is the best match.

I have 64 GB of system memory, and the most that was ever in use during one of these crashes (by Vegas + all other apps) is 23 GB...

This happens for AVC both with NVENC and CPU rendering. I am using the same settings that worked fine on this machine all the way from VEGAS 17:

Dynamic Ram preview: 0MB
Enable Legacy AVC decoding: ON

Video:

  • 3840x2160
  • 60 fps
  • number of slices = 4
  • Mainconcept CBR/VBR or NVENC high

Audio:

  • 48 kHz AAC (320KBPS)

My system specs:

  • MOBO: Gigabyte x570 AORUS Ultra
  • CPU: AMD Ryzen 5900X - stock clock speeds
  • RAM: 64GB 3600 MHZ G.Skill (with heatsink but without RGB)
  • GPU: RTX 3070 w 8 GB VRAM (Gainward Brand)
  • Storage: 5TB SSD, 20 TB HDD
  • Windows 11 Pro

Screenshot of the issue here:

Memory used was never over 9.4 GB this time. Stopped at frame 29896 of 34801 so about 87% done. It stops at a different frame each time though.
 

Comments

Andrew-Stevenson wrote on 11/16/2023, 1:57 PM

I used to see this error on my old system. In my case it was caused by not having enough GPU memory for complex 4K projects.

Why are you using legacy AVC decoding? Have you tried the default NVENC settings? I found that Vegas offers a lot of NVENC profiles that don't actually work in practice.

SH-1audio wrote on 11/16/2023, 3:02 PM

I used to see this error on my old system. In my case it was caused by not having enough GPU memory for complex 4K projects.

Why are you using legacy AVC decoding? Have you tried the default NVENC settings? I found that Vegas offers a lot of NVENC profiles that don't actually work in practice.

I've only tried NVENC settings that do work in OBS and did work just fine in VEGAS Pro 17-20. But it also happens without NVENC on at all. So it's not an NVENC problem.
And I checked, I definitely have at least enough system RAM to render with the CPU.

I am using legacy AVC decoding because it has proven to A: render faster and B: make editing smoother in the past. I have used it all the way back when it was a hidden option(disabling so4 in the internal settings), too.

My projects rely heavily on AVC encoded mp4 files from OBS. Without legacy AVC decoding, most of them get stuck with the render window showing 0% CPU usage and nothing happening.

VEGASDerek wrote on 11/16/2023, 4:16 PM

As Andrew-Stevenson guessed, this error is typically due to GPU memory running out. Your CPU is a 12 core and 24 thread processor...I believe you could consider reducing the number of render threads (Options/Preferences...go to the Video tab and set "Maximum number of rendering threads" to 16 or so), to help reduce the GPU memory usage. We are working on improved resource allocation as part of the new video engine, but the work for AVC is a little ways off yet.

SH-1audio wrote on 11/16/2023, 4:33 PM

As Andrew-Stevenson guessed, this error is typically due to GPU memory running out. Your CPU is a 12 core and 24 thread processor...I believe you could consider reducing the number of render threads (Options/Preferences...go to the Video tab and set "Maximum number of rendering threads" to 16 or so), to help reduce the GPU memory usage. We are working on improved resource allocation as part of the new video engine, but the work for AVC is a little ways off yet.

My question is- If I am not using the GPU in the render at all though, how is my GPU memory even a factor?

Because it does happen with CPU renders just the same- which should be using system memory only, unless there is some resizeable BAR stuff going on that I don't know about.

Plus, this is a new thing that started happening after I installed VEGAS 21 only- So based on my experience working with all type of creative software over the years I am willing to bank on it being caused by a new feature I'm using, like the adjustment track.

Will delete that and do a test render.

VEGASDerek wrote on 11/16/2023, 4:38 PM

If you are using the GPU for video processing (in the Video tab in the preferences), you will likely still run into this problem regardless of the settings you use for decoding or rendering.

SH-1audio wrote on 11/16/2023, 5:43 PM

If you are using the GPU for video processing (in the Video tab in the preferences), you will likely still run into this problem regardless of the settings you use for decoding or rendering.

Not really. I have never encountered this in >5 years of using VEGAS Pro as a professional. Even with less powerful machines than this one. And my projects haven't been getting more complex- it was always 4k 60 hz AVC screen recordings from OBS and voiceover in wav format- with masking, 30+ video tracks and some FX.

So I am very very sure that this is something that was introduced in VEGAS Pro 21 (because I have used 15, 17, 18, 19 and 20 and I never had this issue with them).

FWIW, this does not prove my assumption, but I deleted the adjustment track and the render went through without a hitch. So from where I am standing this means that the adjustment track feature probably needs some more time in the oven.

VEGASDerek wrote on 11/16/2023, 9:11 PM

If you are seeing this with an adjustment event, that would lead me even more into thinking the problem is that you are running out of GPU memory from the high rendering thread number and GPU video processing. The compositing required for creating each frame with adjustment event will be a bit more GPU RAM intensive if you are processing video on the graphics card. Not so much a problem with adjustment events as it is with the memory management of the video engine in general. This memory error has popped up for other users as well when heavy compositing is happening on their timeline. The fact that your system's CPU will set VEGAS to use 24 rendering thread means it is trying to render 24 frames at once. As strange as it sounds, the more cores the CPU has, the more likely you will run into these problems. This exposes some of VEGAS' resource management problems which we are working to fix.

Of course, this is just a educated guess right now as I don't have access to analyze your system, but my original suggestion to restrict the number of rendering threads remains.

SH-1audio wrote on 11/17/2023, 12:05 PM

Unfortunately, setting a lower number of rendering threads does not change anything. GPU memory usage as reported by task manager does not exceed 7 GB for the whole render (The RTX 3070 has 8)

You can see the point the render stopped at the left edge. This was using NVENC.