Video Device Out device selection in 2025 official

Hello,
please may I ask how exactly does device selection work now? I have found following mention in release notes:

Device selection is now more portable between machines, using a device index if the exact device can’t be found.

I am not sure what is the device index in this context - is it a menuIndex?

Up until now I was using a simple piece of custom logic to help me with Video Device Out portability between machines. It was something along these lines:

# pick the device based on a label
labels = node.par[parName].menuLabels
for i, label in enumerate(labels):
	if label == targetValue:
		node.par[parName].menuIndex = i

This was especially useful in scenarios where multiple servers / render nodes were involved and they all had the same card - lets say it was Blackmagic DeckLink Quad (but they also had another Blackmagic cards installed).

In older TD versions I could either specify output device using menuIndex number, or using actual device name.

Using index number isn’t a good choice as Blackmagic cards can be installed in different order on these systems. Even if you were to install them exactly the same way, Blackmagic SDK sometimes likes to twist your expectations and shuffle their order randomly (not sure why it happens but I have seen it many times). Index number is therefore out of the game.

Using actual device name isn’t possible, as each system will have unique device name (that goes something like this: V1|||136750900|||0|||0|||DeckLink Quad (1)).

Therefore I have used labels for this purpose (as mentioned in the code above).

Now that I see 2025 branch has some new additions in this area, I was wondering what is the new approach and how could users utilize it? In case the device index means menuIndex, do you somehow cover the situation where Blackmagic SDK reports cards in random order? Thanks :slightly_smiling_face:

I’ve added some details to this article about how this works:

Can you check that out and see if you have further questions?

@malcolm thank you very much for info, this sounds great. Please may I also ask whether this fallback logic is used whenever the value (of device par) changes, or is it used only during startup?

Lets say I would do following during runtime, would it still use the fallback logic to choose the correct device (if primary combination of ‘Device Unique ID’ and ‘Device Sub Index’ wouldn’t be found)?

op('videodevout1').par.device = 'V1|||136750900|||0|||0|||DeckLink Quad (1)'

It’ll try using the Device Label+SubIndex next. If there is no match for that, then it uses Device Index+SubIndex

Great, thank you very much for info.