07-02-2020 10:16 AM
I'm trying to composite 2 different camera inputs, and have the configuration remain 'sticky'....stays that way no matter what else you do on the codec.
The command 'xCommand Video Input SetMainVideoSource ConnectorId:1 ConnectorId:2 Layout:Equal' in the API seems to do what is required, but it is not 'sticky'. If someone wants to use the PTZ controls for one of the cameras, for example, it goes back to a single camera view.
So to get around that, I was trying to create a command button on the Touch 10 that would re-initiate the composite view.
The same command just doesn't seem to work when sent from a macro. It has to be reformatted for the requirements of a macro, and that seems to get me to this:
xapi.command('Video Input SetMainVideoSource', { ConnectorId: '1', ConnectorId: '2', Layout: 'Equal'} );
But this doesn't work. Just sets main video to Connector 1, and completely ignores Connector 2. If I reverse the order of the connectors in the command, then it does the opposite. It's like the macro processor doesn't understand the command the same way that the API does.
There must be a way around this, to get source compositing to work permanently. Can anyone around here lend a hand? I'm sure this can't be very complicated....just me.
07-02-2020 11:14 AM
07-03-2020 11:32 AM
Thanks.
I think thought that I'm not looking for a way to program new camera controls. I don't relish the idea of teaching dozens of people a new way to do camera control.
Really just looking for a way to format that command so the codec will accept it, then I'll tie it to a new button on the Touch 10. If I get ambitious, I'll make a script that triggers on certain events (which are known to reset the layout), and set it back to dual equal cameras.
07-08-2020 02:37 PM
I was able to find out the syntax for main camera compositing in a macro:
xapi.command('Video Input SetMainVideoSource', { ConnectorId: [1, 2], Layout: 'Equal' } );
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide