arboyle

New Member
Hello all, I have a question that might have a bit of an obscure answer: Without bogging you all down with too many details, I am looking for some clarification on how the "monitor_id" setting of a display capture source is formatted within a scene JSON file. The ultimate goal I am trying to achieve is the use of a distributed scene file for multiple machines across a closed network, I need to automatically copy a base file and change the source details on each machine to capture the appropriate display, I have the capacity to automatically edit the JSON file and I understand that the first part of that string is simply the device instance path formatted (as verified in the screenshot of the PowerShell and Device Manage windows), but what is the second half (highlighted portion of the JSON screenshot) of the string? I know it is relevant as the scene file will not be able to find the correct display source unless both parts of the string are formatted correctly but I have not been able to discern what that second half of the "monitor_id" setting represents? Any insight anyone would be able to provide into this would be greatly appreciated!!

DeviceInstancePath.PNG

sceneFile.PNG


TLDR: Need to know how "monitor_id" setting is formatted following the device instance path (what is the highlighted part in the JSON screenshot)
 

arboyle

New Member
DeviceID from:
Thanks for the insight! Is that DeviceID value accessible from outside the OBS API? Like is there a value I could query Windows for to get that value (similar to what I've done above for the monitor's device instance ID)?
 

koala

Active Member
It's returned by EnumDisplayDevicesA from the Windows GDI API. How it's called see the quoted source, how it's defined see the Windows API doc.
 
Top