Use of Switch(control) and video textures returning null

Hello!

I am having the following situation :
I am using 3 different videoplayers who are all reading different video.
I convert them as stride video textures
Then, I want to blend them twice with Stride.TextureFX
So I have 2 switch(control) nodes
Most of the textures are send all over the patch with pads (instead of send/receive(global) node)

I couldn’t reproduce in a simple patch as the one I am attaching here, but in my main project, which has a lot of things going on, one of the switch node doesn’t return any texture, only a null….

Am I doing it the right way? Why is there a null returned?

testSwitch.vl (16.5 KB)

You can put the Videoplayer inside a ForEach (instead of copy and pasting it multiple times) and then getslice the textures you need instead.

1 Like

that is an idea. I tried.

BUT :
if I use foreach, it means that all the videos are played in the same time within foreach region. And in every folder, I have 30+ video.
1 : So the output video, chosen with a getslice is laggy
2 : In the original project, I want to change the index of the getslice of each video player, when it reaches the end. But if the videoplayer is in for each loop, I cannot access to each video’s durantion to bang it to the next video.

So this doesn’t work :’(

Are you trying to read 3 videos at the same time from a folder that contains many ?

You can pause each individual instance of the player (and set all other parameters as well).

You can output it just like the textures.

@lecloneur Yes I am sending several videos from a folder that contains many

1:
For the original problem, I actually nailed the problem!
In my setting, switch node had was receiving a null (empty data) from somewhere intentionally.
So even if the pin was not used, the null data pin was blocking the whole switch node.!!
I therefore feed the empty data with a transparent layer, and now it works

2: @bjoern
ohhhhhhhhhh! of course!! why didn’t I think of that?!
thanks for the input
But then, is it better to have only 1 video player than 3 duplicated one, is that it?
I am going to integrate your solution, and see if I understand the whole thing in my workflow
thank you!