Page 1 of 1

Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 5:16 am
by Justin990
I am learning how to use DaVinci resolve. I have a 2019 MacBook Pro with 16Gb ram (nothing else running). When I string together a few videos, and perhaps have a few videos side by side, and a fusion clip (animated logo) over the top everything works great and I can export render.

I just tried a project that works with 10 image files, it slides them onto the screen one by one, and adds some text below each one. (also with the fusion clip overlay for logo). It plays ok (jittery but plays), but when I try to render the clip DaVinci literally crashes about half way through (a different point each time). The screen goes red for half a second, then the app closes. The apple generated stack trace seems to imply an out of memory problem.

I upgraded to the latest Davinci and mac iOS as of today, and the problem is still occurring. I am a little confused about why animating a few images on the screen causes this problem. I can definitely do this in keynote without any drama at all.

Is this normal, or strange? Are there any tips for trying to get DaVinci resolve to not crash on a mac when animating a handful of images?

Thanks!

Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 11:12 am
by Peter Chamberlain
Moved to Resolve forum

Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 1:56 pm
by Dave Shortman
You don't say if you are loading these 10 images in fusion or on the timeline.

If in fusion, you could try using the Loader nodes instead of MediaIn.

If on the timeline, I'd resize the images if they are wider than the target screen size (before importing into the media pool).

Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 5:20 pm
by Peter McLennan
Animating large still images is one of the main reasons I invested in Resolve. I've successfully animated images as large as 10K pixels wide with only a few issues.

I found that copying them to my NVMe internal SSD avoids playback issues that arise when sourcing them from spinning media. I have an RTX 3060 which is not blindingly fast, but does have 12GB of GPU RAM.

I animate them solely from the timeline and the Inspector, avoiding the relatively slow performance and poor iterative feedback from a Fusion based workflow. With Inspector, I can instantly see changes I've made.

My biggest problem is the difficulty of controlling the "ease in/out" controls available in the inspector.



Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 5:40 pm
by bounceHouse
@OP, it looks like Peter M's video above is one image at a time - not overlapping images whose interaction/overlapping I suspect places a much larger load on the GPU calculations, which I think you are doing based on your description of sliding them onscreen.

Based on a previous experience with a collage causing render issues at the GPU, perhaps downsizing all your source images using imagemagick would help. See viewtopic.php?f=21&t=139764
and in particular:
If I make a copy of the image folder (to retain the originals) and run imagemagick to mogrify the ones Resolve is using down to 700 pixels maximum dimension, then suddenly everything speeds back up and crashes go away, for example on a PC w/ImageMagick installed, from a cmd window in that folder whose files will be overwritten: magick mogrify -resize 700 *.jpg


There is a Mac version of imageMagick as well.

Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 6:29 pm
by Sean Nelson
Justin990 wrote:I just tried a project that works with 10 image files...

One of the common issues working with image files is using images larger than necessary. With today's still cameras producing 40 and 50 megapixel images, you have to be careful because when you bring anything into Resolve each pixel turns into 16 bytes of information. This is because Resolve represents pixels as four 32-bit floating-point numbers representing the R, G, B and Alpha channels.

So your 40 megapixel image suddenly takes well over half a gigabyte of memory, and when you're mixing multiple large images together with all the intermediate image processing steps you can gobble up many gigabytes very quickly.

The first thing you should do when using images is to determine what maximum resolution you'll need for them and then downscale them to that resolution before importing them into resolve. An image to be used in a project shouldn't need to be have any higher resolution than the project itself unless you need to zoom into it.

Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 7:28 pm
by Peter McLennan
Good advice, Sean. This was one of my first attempts at animating still images and I used the highest pixel count I had available. I wasn't sure at the outset just how much I'd be enlarging (zooming), so I left myself lots of latitude.

As it turns out, you can't pan and zoom much. Complex moves take too long on-screen and wind up being boring. My next attempt will use smaller images. I also used the highest JPG compression quality when preparing the images. I'll next experiment with smaller pixel dimensions and more jpg compression to see if that will cut down on the computer's workload. Since the images are decompressed during the edit, I'm not sure how much difference that will make.

Re: Memory issues when animating static image files?

PostPosted: Mon Nov 29, 2021 8:03 pm
by Sean Nelson
Peter McLennan wrote:I'll next experiment with smaller pixel dimensions and more jpg compression to see if that will cut down on the computer's workload. Since the images are decompressed during the edit, I'm not sure how much difference that will make.

I don't think you'll see any noticeable difference with various compression settings. They can make a difference in video because the system has to decompress 24, 30, 60 etc frames per second, with a JPG you decompress it once and you're done.

It's the resolution that will make a difference because the software has to store and manipulate 16 bytes for every pixel in the image for every frame being generated, so you don't want to include more of them than you really need.

Re: Memory issues when animating static image files?

PostPosted: Tue Nov 30, 2021 12:56 am
by Peter McLennan
Excellent info, Sean. Makes sense. Thanks!

Re: Memory issues when animating static image files?

PostPosted: Wed Dec 08, 2021 3:15 am
by Justin990
I've learnt some helpful things here. Thanks for all of your replies. None of the pictures are particularly large compared to how much memory my computer has. For example, 2000x2000 x 16 bytes x 10 pictures is only about 625Mb, and my Mac has 16Gb with nothing else running on it.

Unless something interesting is happening like "load all images from the whole timeline (even when they are not being shown on the frame) and keep them in memory during the rendering process (even when they are not needed for rendring)", that would add up to about 3Gb of memory needed to to hold all of them in memory render this project.

Again, like I said at the start, this is something I have done before in Keynote on my Mac, and keynote has never crashed before. I'd love it if davinci could do some basic image animations as well, as it is definitely more powerful.

I will rebuild this entire project from scratch in Davinci Resolve today and see if it makes any difference.

Re: Memory issues when animating static image files?

PostPosted: Thu Dec 09, 2021 5:14 am
by Uli Plank
Justin, it's not about RAM, but about VRAM! How much do you have?
To prepare your animation for video, GlueMotion might be a helpful software.