camera substitution on the ATEM mixer

Questions about ATEM Switchers, Camera Converter and everything live!
  • Author
  • Message
Offline

Christian Skovengaard

  • Posts: 3
  • Joined: Sun Dec 31, 2017 12:51 pm

camera substitution on the ATEM mixer

PostTue Jan 02, 2018 7:53 pm

Hi.
Is is possible to do substitution on the ATEM mixer, so when CAM5 is pressed on the program layer, another CAM will be cut on a aux?

Maybe this is possible using macros? Is it possible to apply logic in a macro. (if cam5 ME1 then -> something else on ME2)

Thanks

Christian Skovengaard

Christian Skovengaard
Danish Broadcast corporation
Offline
User avatar

Jack Fairley

  • Posts: 1863
  • Joined: Mon Oct 03, 2016 7:58 pm
  • Location: Los Angeles

Re: camera substitution on the ATEM mixer

PostTue Jan 02, 2018 11:58 pm

This is probably possible somehow in JustMacros, but not with the stock tools.
Ryzen 5800X3D
32GB DDR4-3600
RTX 3090
DeckLink 4K Extreme 12G
Resolve Studio 17.4.1
Windows 11 Pro 21H2
Offline

Asgeir Hustad

  • Posts: 334
  • Joined: Tue Sep 26, 2017 10:13 am
  • Location: Norway

Re: camera substitution on the ATEM mixer

PostWed Jan 03, 2018 7:18 am

I created just this functionality using JustMacros for a client. It is very simple coding, where you simply add a line for each source number you want to add custom functionality for, triggered when the user clicks the TAKE-button.

However, this was triggered from an X-Keys, not for every control panel, which will be a bit harder to achieve. You need a PC with JustMacros and an Ethernet-connection, "Monitoring scripts", and some time searching atemuser.com / https://secure.justmacros.tv/
Offline

Christian Skovengaard

  • Posts: 3
  • Joined: Sun Dec 31, 2017 12:51 pm

Re: camera substitution on the ATEM mixer

PostWed Jan 03, 2018 7:30 pm

Asgeir Hustad wrote:I created just this functionality using JustMacros for a client.


Hi Asgeir. Not asking for the complete code, would it be possible to have a peek at your code?
Thanks
Christian
Christian Skovengaard
Danish Broadcast corporation
Offline

Asgeir Hustad

  • Posts: 334
  • Joined: Tue Sep 26, 2017 10:13 am
  • Location: Norway

Re: camera substitution on the ATEM mixer

PostThu Jan 04, 2018 1:13 am

Christian Skovengaard wrote:Hi Asgeir. Not asking for the complete code, would it be possible to have a peek at your code?
Thanks
Christian


Sure, there are no NDA clauses involved in this project.

Basically, what the client wanted was that when the Xkeys-stick was used to trigger cuts, the aux should be set as well. When using the software control panel, everything should work as it normally did. This allowed more flexibility for this user. The way this works is by storing the source going on air (i.e currently on preview), then triggering the selected transition, then changing the aux source.

Using basic if /elseif's rather than a lookup table to make it simple for editing by the customer. I'm only showing an excerpt of cuts here.

Code: Select all
local mixerID = 1
local meID = 1
local auxID = 1

-- Store current preview-input
local activePreviewInput = ATEMMixerMEGetPreviewInput(mixerID, meID)
-- Run transition
ATEMMixerMEAutoTransition(mixerID, meID)

if activePreviewInput == 2 then
    ATEMMixerAUXSetInput(mixerID, auxID, 3)
elseif activePreviewInput == 3 then
    -- Aux should mirror program
    ATEMMixerAUXSetInput(mixerID, auxID, 3)
end
Offline

Christian Skovengaard

  • Posts: 3
  • Joined: Sun Dec 31, 2017 12:51 pm

Re: camera substitution on the ATEM mixer JustMacros

PostFri Jan 19, 2018 10:39 am

I got a script working, but its based on a loop in AUTOEXEC.

If I buy the JustMacros Pro version - is there a EventHandler based on ME1 change or Program change, I only currently only seam to find OnATEMPreviewInputChanged.. Maybe a generic state change handler...

Its my understanding that the PRO version opens up a hole new box of stuff..

Thanks
Christian Skovengaard
Danish Broadcast corporation
Offline

Pavel Lavrov

  • Posts: 760
  • Joined: Wed Dec 19, 2012 5:24 am

Re: camera substitution on the ATEM mixer

PostSat Jan 20, 2018 3:58 pm

Christian Skovengaard wrote:I got a script working, but its based on a loop in AUTOEXEC.

If I buy the JustMacros Pro version - is there a EventHandler based on ME1 change or Program change, I only currently only seam to find OnATEMPreviewInputChanged.. Maybe a generic state change handler...

Its my understanding that the PRO version opens up a hole new box of stuff..

Thanks


Not sure what you have right now, as far as the code goes. (if you share the code maybe i can help more) But you can easily create a looping code, even in free version of justMacros, that would scan what’s current program input, preview input, transition state... etc and do what ever you want based on that. For more flexibility you can have code dynamically respond based on external input such as x-keys, by using global variables to pass information between scripts.


Sent from my iPhone using Tapatalk Pro
Pavel L
Offline

Morten Stensland

  • Posts: 4
  • Joined: Sat Oct 28, 2017 2:19 pm

Re: camera substitution on the ATEM mixer JustMacros

PostMon Aug 06, 2018 9:40 am

Christian Skovengaard wrote:I got a script working, but its based on a loop in AUTOEXEC.

If I buy the JustMacros Pro version - is there a EventHandler based on ME1 change or Program change, I only currently only seam to find OnATEMPreviewInputChanged.. Maybe a generic state change handler...

Its my understanding that the PRO version opens up a hole new box of stuff..

Thanks



You can use EventHandler to do this, but you must use OnATEMTXInputChanged, Eventhandler nr. 12.
I think "TX stands for "take". This eventhandler is only included in the pro-version .
Im now using eventhandler to control aux automatically based on program-change, and I am very happy with how it works.

Asgeir Hustad wrote:I created just this functionality using JustMacros for a client. It is very simple coding, where you simply add a line for each source number you want to add custom functionality for, triggered when the user clicks the TAKE-button.

However, this was triggered from an X-Keys, not for every control panel, which will be a bit harder to achieve. You need a PC with JustMacros and an Ethernet-connection, "Monitoring scripts", and some time searching atemuser.com / https://secure.justmacros.tv/


It was actually me who asked Asgeir to make this code, and I can confirm that I have no problems with him sharing the code. The solution he made for me was great, but it depended on the x-keys panel. With Eventhandlers doing the same I can make the scripts work just by using the frontpanel of the ATEM if needed, and I feel that this is more flexible and reliable.

On the justmacros website you can also find some very useful script-packs that you can play with to get a better understanding of justmacros events.
www.brekkelyd.no

Return to Live Production

Who is online

Users browsing this forum: No registered users and 58 guests