Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Decoupling Syphon framerate from rest of network?

General discussion about anything TouchDesigner

Decoupling Syphon framerate from rest of network?

Postby no_shaders » Mon Feb 11, 2019 12:25 pm

Howdy all,

I've got a network that looks somewhat like this:

https://i.imgur.com/BQ761dU.png%5b/img:u7xkfmw2

I'm capturing a camera stream and performing some fairly intensive computer vision on the frames (using a C++ DLL), and then sending the video to another program over Spout and the CV data over websockets.

The computer vision is bringing down my overall framerate to <30FPS, which also slows down the Spout framerate. TD has helpfully synced up everything, which would be awesome in a lot of cases, but I don't actually need to synchronize; it's ok if the video stream comes in at 60FPS and the websocket data at 30FPS. The receiving program doesn't need them to be in perfect lockstep, and a little delay is totally ok.

So, I'm wondering if it's possible to decouple the two. Can one part of my network run at 60FPS and another at 30FPS, or is that a fundamental impossibility?

Thanks so much!
no_shaders
 
Posts: 2
Joined: Mon Feb 11, 2019 12:08 pm

Re: Decoupling Syphon framerate from rest of network?

Postby no_shaders » Mon Feb 11, 2019 3:53 pm

Note - I ended up adding threading to my C++ DLL, and just dropping every other frame. Works like a charm, but I'm still curious if there's a way to do this at the TD level, especially if I was using built-in OPs instead of a custom DLL.
no_shaders
 
Posts: 2
Joined: Mon Feb 11, 2019 12:08 pm

Re: Decoupling Syphon framerate from rest of network?

Postby raganmd » Mon Feb 11, 2019 9:03 pm

hi no_shaders -

One option might be to break this into multiple processes - something like the new Process COMP in the experimental branch might be something that address this need.
raganmd
 
Posts: 1364
Joined: Thu Mar 28, 2013 5:21 am
Location: San Francisco, CA

Re: Decoupling Syphon framerate from rest of network?

Postby bvc_lvthn » Wed Feb 13, 2019 11:47 am

In a recent application I worked on video frames were sent via either spout or 'shared memory' to a fully independent c++ application. Once processing of the video frame is complete the results can be handled at the developer's discretion. This nicely decouples touchdesigner and its draw loop from the work done in c++.
bvc_lvthn
 
Posts: 20
Joined: Fri Jun 29, 2018 5:29 pm

Re: Decoupling Syphon framerate from rest of network?

Postby malcolm » Wed Feb 13, 2019 12:18 pm

To have a sub-section of your file run at 30fps, you can add a Component Time to a COMP (under the right click menu for the network). This is a secondary timeline that can run at a lower FPS than your main file is. Ideally the FPS should evenly divide your main FPS. So 30 and 60 is fine
User avatar
malcolm
Staff
 
Posts: 4256
Joined: Tue Nov 13, 2007 1:11 am


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 14 guests