RAM heavy usage with TextureQueue & Keep

Hi guys,
I’m experiencing heavy RAM usage with this patch :

TextureQueueTest-Application_2023.10.20-19.08.51

What I’m trying to acheive here is sampling a VideoIn texture : 1 out of every10 frames for 6 times. This patch works well but it loads RAM out in some minutes and vvvv crashes. I wonder if there’s better way to patch this.
Thank you

TextureQueueTest.vl (21.9 KB)

You can use getslice to achieve the same effect and avoid the apparent memory leak.


TextureQueueTest-GetSlice.vl (20.0 KB)

EDIT:

Even better if you set the mainloop to the same framerate as the video coming in
image
TextureQueueTest-GetSlice-MainLoop.vl (20.9 KB)

1 Like

I would probably still recommend doing this with feedback

it’s a fun patch to play around with

3 Likes

Thank you @sunep ! this solved the RAM issue.
It is indeed a very simple patch with effective visual feedback for users :)

Anyway, what do you mean by “doing this with feedback” ?

You can achieve a similar effect using texture feedback.

EDIT: then you would not need to have a texture queue, just copy one texture back, but it is a bit tricky to tweak to look good. It really depend on the setup, how clean a background you can get

@sunep right, the first prototype I did was indeed with texture feedback but I couldn’t control much of the sample rate so I switched to texture queue. Thanks for the tip !