Dowload photos asynchronously

Hi

I’m working on a project that display multiple images downloaded from the web but I have a problem that the framerate drops from 60 to 45 and there is a little stutter every time a photo is downloaded (I download them from the MovieFileIn TOP). Is there a way to download the image in a another thread or do you have another idea how to avoid this problem?

Thanks!

I would recommend having a second TD instance (second TD application) open.
First instance → download → save to file or send via touchoutTOP
Second instance → read from disk or read touchinTOP and render output

That way the downloading application can freeze / drop frames all it wants without causing visual problems.

Do you have your timeouts on your Tune page set to low values? You’ll want to let TouchDesigner continue running while the file is fetched/opened.

g

( accidentally deleted comment. apologies. Admin)

I’d echo what tmisk recommends. Either use another touch process to fetch and save files, or run a background script with python to stash them in a folder somewhere.

Depending on their resolution you’ll also run the risk of dropping frames when you reload - using the cache memory flag in the moviefile in works well if all of your images are the same resolution.

Did you try reducing the timeouts to 1 msec?

Hey I’m trying to solve the same problem here. I’m using a folder dat to load images from a folder into a movie file in top. I played with the tuning but i still get drop outs.

I noticed there is an option for Asynchronous update on the dat, but when i turn it on, it seems refreshing completely stops and the folder no longer updates (when im looking at an info chop).

Does the asynchronous button need to have the refresh turned on as well, or is it independent?

holy heck I did not realize these two parameters worked this way all of my time using TD. this effectively makes the movie file in top “async-ish”. Though if I understand correctly, if I have 16 movie file ins, all with their timeouts set to 1 ms, that means I am accumulating 16 ms worth of process stall due to each movie file in waiting 1 ms?

does setting them to 0 ms effectively make them entirely async?

I generally set timeout to 0 msec and rely on the pre-read to make the images available in time.

1 Like