SteffeyDev / atemOSC

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

Get current program and preview #159

Closed richieclare closed 3 years ago

richieclare commented 4 years ago

I'm looking to create a python script that sits between different bits of equipment. Some of the equipment could start up in a different state than the ATEM. Is there a way to get the current preview and program camera id? I know I can do /atem/send-status but that sends a lot of information - I just need whichever ever input is preview and program. Thanks

SteffeyDev commented 4 years ago

Right now send-status is the only option, but #108 is a feature request to get the current tally, which would return just a list of cameras that are live. It sounds like you just want a smaller version of send-status that just returns the preview/program status without all the rest, correct?

richieclare commented 4 years ago

Yes that's what I would like. I guess it is not a big deal because I can get the info just I get a lot of info :) Thanks

SteffeyDev commented 4 years ago

Ok, check out 3.1.6 and the new command /atem/send-status/mix-effect-block and let me know if it works better for you. Sends program/preview, bar, and preview status. Much less info than the full send-status.

richieclare commented 4 years ago

Thank you - that is definitely better. Was ideally hoping for some kind of thing where I could just write program=/atem/send-status/get-program or preview=/atem/send-status/get-preview

Basically I was hoping that you would do a lot of the work for me :) I can definitely cope with how it currently works though thanks

SteffeyDev commented 4 years ago

What python OSC library are you using? Obviously being UDP based you can’t ask for a value and get the response in a single conversation. I might be able to give you something close to that though

richieclare commented 4 years ago

I'm using python-osc but I actually got side-tracked on other stuff so haven't made much progress on it since I made the first request. I can make it work with what you have provided so please don't go to any effort on my behalf as I'm sure there are plenty of other things more fun to work on. Thanks