SteffeyDev / atemOSC

Control ATEM video switchers over the network with OSC messages
http://www.atemosc.com
202 stars 32 forks source link

Control multiple switchers #170

Closed bnmohr closed 3 years ago

bnmohr commented 4 years ago

Other than running atemOSC on multiple computers, is there a way to have multiple instances/switcher paths open so that I can send osc to different ports to control different switchers? I believe you would have to id each instance so that return messages could be flagged in the return address with the id of the switcher for which incoming messages belong. Thanks

XENONChromatic commented 4 years ago

I cant say with certainty that this will work with atemOSC, as the way some apps utilize their application support files and other external files (outside the app bundle) precludes this, but there is nothing preventing you from simply making a second version of an app (MyAppName 2) and running both at the same time. I do this once in a while when I need multiple instances of an app, and for the apps that can do this without issue it works fine.

sneat commented 4 years ago

Back when I used to use atemOSC in production I would do what carbon43 has suggested. Run multiple renamed copies. It had some little issues if you lost network connectivity, but otherwise worked fine. I haven't had access to ATEM switchers in close to 2 years now though, so the code has changed a little since then - but I can't see why it would be any worse than it was, and possibly better.

mbgregg commented 4 years ago

I'm trying what carbon43 suggested, but sadly, it's forcing you to be connected to only one at a time. @bnmohr did you find a way around this?

bnmohr commented 4 years ago

I haven't had a chance to try it, and I wrecked an event messing around with the switcher so I need to learn more about the switcher and exactly what each osc command is doing. But if it's possible to run two instances that would certainly be an acceptable solution.

mbgregg commented 4 years ago

The challenge is that the separate instances do not allow you to set a different IP for each. When you set one to a particular IP, the other automatically assumes that IP.

I have some automation I’m trying to do with one of my ATEMs having to feed into another one of my ATEMs. In order to send out commands, I need to send commands at both .240 and .251. What I will most likely do is an AppleScript that will do a UI command to input another IP into the field and force a key press to confirm the change. But that’s super messy and prone to buggy behavior.

Hopefully this can get figured out. Would be willing to donate some $ to get this into the pipeline.

bnmohr commented 4 years ago

Yes, scripting changes to the IP address does not seem safe at all during a show/event. I am not connected to switchers, but I was able to launch two separate instances and give them different IP targets.

SteffeyDev commented 4 years ago

Not sure why the two instances would share data TBH, the IP is written to your preferences file when it is changed, but the preferences file is only read back into the app on launch, so there shouldn’t be a mechanism to transfer the IP from one instance to another. @mbgregg can you link a screen capture video showing what happens with two instances running?

bnmohr commented 3 years ago

if I duplicated my atemosc program or if I download a new application I did get similar behavior to mbgregg- launching the second app would inherit the first IP and ports and window placement. You can set the second instance to a new ip and port, but then clicking back to the fist instance asks if you want to switch connections, to which you actually want to say yes, which relatched the original IP you entered. If you say no, it switches the the ip of the second app. However once you've done this, it seems to settle down and I can control two switchers by hitting the different ports. https://youtu.be/NHQARSrBV1I

mbgregg commented 3 years ago

@bnmohr exactly. This would be cool if one application could control an array of ATEM switchers and their configurations. @danielbuechele

SteffeyDev commented 3 years ago

Completed in latest release, 4.0.0. See documentation for usage.