Video switching commands

class pyatem.command.VideoModeCommand(mode)

Implementation of the CVdM command. This sets the main video mode for the hardware

Offset

Size

Type

Description

0

1

u8

M/E index

1

1

bool

Preview enabled

2

2

?

unknown

__init__(mode)
Parameters:

mode – The new video mode ID

class pyatem.command.AutoInputVideoModeCommand(enable)

Implementation of the AiVM command. This enables or disables automatic video mode detection based on the video signal.

Offset

Size

Type

Description

0

1

bool

Enable

1

3

?

unknown

__init__(enable)
Parameters:

enable – Set auto mode enabled or disabled

Program / Preview bus

class pyatem.command.ProgramInputCommand(index, source)

Implementation of the CPgI command. This is equivalent to pressing the buttons on the program bus on a control panel.

Offset

Size

Type

Description

0

1

u8

M/E index

1

1

?

unknown

2

2

u16

Source index

__init__(index, source)
Parameters:
  • index – 0-indexed M/E number to control the program bus of

  • source – Source index to activate on the program bus

class pyatem.command.PreviewInputCommand(index, source)

Implementation of the CPvI command. This is equivalent to pressing the buttons on the preview bus on a control panel.

Offset

Size

Type

Description

0

1

u8

M/E index

1

1

?

unknown

2

2

u16

Source index

__init__(index, source)
Parameters:
  • index – 0-indexed M/E number to control the preview bus of

  • source – Source index to activate on the preview bus

Aux routing

class pyatem.command.AuxSourceCommand(index, source)

Implementation of the CAuS command. This selects the source that will be sent to a specific AUX output

Offset

Size

Type

Description

0

1

u8

Mask, always 1

1

1

u8

AUX index

2

2

u16

Source index

__init__(index, source)
Parameters:
  • index – 0-indexed AUX output number

  • source – Source index to send to the aux output

Transitions

class pyatem.command.CutCommand(index)

Implementation of the DCut command. This is equivalent to pressing the CUT button in the UI

Offset

Size

Type

Description

0

1

u8

M/E index

1

3

?

unknown

__init__(index)
Parameters:

index – 0-indexed M/E number to send the CUT to

class pyatem.command.AutoCommand(index)

Implementation of the DAut command. This is equivalent to pressing the AUTO button in the UI

Offset

Size

Type

Description

0

1

u8

M/E index

1

3

?

unknown

__init__(index)
Parameters:

index – 0-indexed M/E number to send the AUTO transition to

class pyatem.command.TransitionPreviewCommand(index, enabled)

Implementation of the CTPr command. This sets the state of the Transition Preview function of the mixer

Offset

Size

Type

Description

0

1

u8

M/E index

1

1

bool

Preview enabled

2

2

?

unknown

__init__(index, enabled)
Parameters:
  • index – 0-indexed M/E number to control the preview bus of

  • enabled – New state of the preview function

class pyatem.command.TransitionSettingsCommand(index, style=None, next_transition=None)

Implementation of the CTTp command. This is setting the transition style for the M/E unit between the Mix, Dip, Wipe, String and DVE transition style.

The style argument takes one of the values from the TransitionSettingsField constants: TransitionSettingsField.STYLE_MXI TransitionSettingsField.STYLE_DIP TransitionSettingsField.STYLE_WIPE TransitionSettingsField.STYLE_STING TransitionSettingsField.STYLE_DVE

The next_transition argument is a bitfield that sets the state of the “Next Transition” buttons, the row with the BKGD button.

Offset

Size

Type

Description

0

1

u8

Mask, bit0=set style, bit1=set next transition

1

1

u8

M/E index

2

1

u8

Style

3

1

u8

Next transition

bit

Next transition button

0

BKGD

1

Key 1

2

Key 2

3

Key 3

4

Key 4

__init__(index, style=None, next_transition=None)
Parameters:
  • index – 0-indexed M/E number to control the preview bus of

  • style – Set new transition style, or None

  • next_transition – Set next transition active layers, or None

class pyatem.command.TransitionPositionCommand(index, position)

Implementation of the CTPs command. This sets the state and position for the transition T-bar control.

Offset

Size

Type

Description

0

1

u8

M/E index

1

1

?

unknown

2

2

u16

Position [0-10000]

__init__(index, position)
Parameters:
  • index – 0-indexed M/E number to control the transition of

  • position – New position for the T-bar [0-10000]

Transition settings

class pyatem.command.MixSettingsCommand(index, rate)

Implementation of the CTMx command. This sets the transition duration for the mix transition panel.

Offset

Size

Type

Description

0

1

u8

M/E index, 0-indexed

1

1

u8

Rate in frames

2

2

?

unknown

__init__(index, rate)
Parameters:
  • index – 0-indexed M/E number to set the transition duration for

  • rate – Transition length in frames

class pyatem.command.DipSettingsCommand(index, rate=None, source=None)

Implementation of the CTDp command. This sets the settings for the dip transition panel.

Offset

Size

Type

Description

0

1

u8

Mask, bit0=set rate, bit1=set source

1

1

u8

M/E index

2

1

u8

Rate in frames

3

1

?

unknown

4

2

u16

Source index

6

2

?

unknown

__init__(index, rate=None, source=None)
Parameters:
  • index – 0-indexed M/E number to control the preview bus of

  • rate – Set new transition rate, or None

  • source – Set the dip source, or None

class pyatem.command.WipeSettingsCommand(index, rate=None, pattern=None, width=None, source=None, symmetry=None, softness=None, positionx=None, positiony=None, reverse=None, flipflop=None)

Implementation of the CTWp command. This sets the settings for the wipe transition panel.

Offset

Size

Type

Description

0

2

u16

Mask, see table below

2

1

u8

M/E index

3

1

u8

Rate in frames

4

1

u8

Pattern style [0-17]

5

1

?

unknown

6

2

u16

Border width [0-10000]

8

2

u16

Border fill source

10

2

u16

Symmetry [0-10000]

12

2

u16

Softness [0-10000]

14

2

16

Transition origin x [0-10000]

16

2

16

Transition origin y [0-10000]

18

1

bool

Reverse

19

1

bool

Flip flop

Bit

Mask value

0

Rate

1

Pattern

2

Border width

3

Border fill source

4

Symmetry

5

Softness

6

Position x

7

Position y

8

Reverse

9

Flip flop

__init__(index, rate=None, pattern=None, width=None, source=None, symmetry=None, softness=None, positionx=None, positiony=None, reverse=None, flipflop=None)
Parameters:
  • index – 0-indexed M/E number to change the wipe settings for

  • rate – Set new transition rate, or None

  • pattern – Set transition pattern id, or None

  • width – Set transition border width, or None

  • source – Set transition border fill source index, or None

  • symmetry – Set transition symmetry, or None

  • softness – Set transition softness, or None

  • positionx – Set transition origin x, or None

  • positiony – Set transition origin y, or None

  • reverse – Set the reverse flag for the transition, or None

  • flipflop – Set the flipflop flag for the transition, or None

class pyatem.command.DveSettingsCommand(index, rate=None, style=None, fill_source=None, key_source=None, key_enable=None, key_premultiplied=None, key_clip=None, key_gain=None, key_invert=None, reverse=None, flipflop=None)

Implementation of the CTDv command. This sets the settings for the DVE transition panel.

Offset

Size

Type

Description

0

2

u16

Mask, see table below

2

1

u8

M/E index

3

1

u8

Rate in frames

4

1

u8

Pattern style [0-17]

5

1

?

unknown

6

2

u16

Fill source index

8

2

u16

Key source index

10

1

bool

Enable key

11

1

bool

Key is premultiplied

12

2

u16

Key clip [0-1000]

14

2

u16

Key gain [0-1000]

16

1

bool

Invert key

17

1

bool

Reverse transition direction

18

1

bool

Enable flip-flop

19

1

?

unknown

Bit

Mask value

0

Rate

1

?

2

Style

3

Fill source

4

Key source

5

Enable key

6

Key is premultiplied

7

Key clip

8

Key gain

9

Invert key

10

Reverse

11

Flip-flop

__init__(index, rate=None, style=None, fill_source=None, key_source=None, key_enable=None, key_premultiplied=None, key_clip=None, key_gain=None, key_invert=None, reverse=None, flipflop=None)
Parameters:
  • index – 0-indexed M/E number to change the DVE settings for

  • rate – Set new transition rate, or None

  • style – Set new transition style, or None

  • fill_source – Set new fill source, or None

  • key_source – Set new key source, or None

  • key_enable – Enable the keyer, or None

  • key_premultiplied – Key is premultiplied alpha, or None

  • key_clip – Key clip, or None

  • key_gain – Key gain, or None

  • key_invert – Invert the key source, or None

  • reverse – Set the reverse flag for the transition, or None

  • flipflop – Set the flipflop flag for the transition, or None

Palettes

class pyatem.command.ColorGeneratorCommand(index, hue=None, saturation=None, luma=None)

Implementation of the CClV command. This sets the color for a color generator

Offset

Size

Type

Description

0

1

u8

Set mask

1

1

u8

Color generator index

2

2

u16

Hue [0-3599]

4

2

u16

Saturation [0-1000]

6

2

u16

Luma [0-1000]

__init__(index, hue=None, saturation=None, luma=None)
Parameters:
  • index – Color generator index

  • hue – New Hue for the generator, or None

  • saturation – New Saturation for the generator, or None

  • luma – New Luma for the generator, or None

Downstream

class pyatem.command.FadeToBlackCommand(index)

Implementation of the FtbA command. This triggers the fade-to-black transition

Offset

Size

Type

Description

0

1

u8

M/E index

1

1

?

unknown

2

1

?

unknown

3

1

?

unknown

__init__(index)
Parameters:

index – 0-indexed M/E number to trigger FTB on

class pyatem.command.DkeyOnairCommand(index, on_air)

Implementation of the CDsL command. This setting the “on-air” state of the downstream keyer on or off panel.

Offset

Size

Type

Description

0

1

u8

Downstream keyer index

1

1

?

On air

2

2

?

unknown

__init__(index, on_air)
Parameters:
  • index – 0-indexed DSK number to control

  • on_air – The new on-air state for the keyer

class pyatem.command.DkeyTieCommand(index, tie)

Implementation of the CDsT command. This setting the “tie” state of the downstream keyer on or off panel.

Offset

Size

Type

Description

0

1

u8

Downstream keyer index

1

1

?

Tie

2

2

?

unknown

__init__(index, tie)
Parameters:
  • index – 0-indexed DSK number to control

  • tie – The new tie state for the keyer

class pyatem.command.DkeyAutoCommand(index)

Implementation of the DDsA command. This triggers the auto transition of a downstream keyer panel.

Offset

Size

Type

Description

0

1

u8

Downstream keyer index

1

3

?

unknown

__init__(index)
Parameters:

index – 0-indexed DSK number to trigger

class pyatem.command.DkeyRateCommand(index, rate)

Implementation of the CDsR command. This sets the transition rate for the downstream keyer panel.

Offset

Size

Type

Description

0

1

u8

Downstream keyer index

1

1

u8

Rate in frames

2

2

?

unknown

__init__(index, rate)
Parameters:
  • index – 0-indexed DSK number to change

  • rate – New rate in frames for the keyer

class pyatem.command.DkeySetFillCommand(index, source)

Implementation of the CDsF command. This sets the fill source on a downstream keyer panel.

Offset

Size

Type

Description

0

1

u8

Downstream keyer index

1

1

?

unknown

2

2

u16

Fill source index

__init__(index, source)
Parameters:
  • index – 0-indexed DSK number to control

  • source – The source index to set on the keyer

class pyatem.command.DkeySetKeyCommand(index, source)

Implementation of the CDsC command. This sets the key source on a downstream keyer panel.

Offset

Size

Type

Description

0

1

u8

Downstream keyer index

1

1

?

unknown

2

2

u16

Key source index

__init__(index, source)
Parameters:
  • index – 0-indexed DSK number to control

  • source – The source index to set on the keyer

class pyatem.command.DkeyGainCommand(index, premultiplied=None, clip=None, gain=None, invert=None)

Implementation of the CDsG command. This controls the gain, clip, premultiplied and invert settings for a downstream keyer.

Offset

Size

Type

Description

0

1

u8

Mask

1

1

u8

Downstream keyer index

2

1

bool

Premultiplied

3

1

?

unknown

4

2

u16

Clip

6

2

u16

Gain

8

1

bool

Invert

9

3

?

unknown

Bit

Mask value

0

Pre-multiplied

1

Clip

2

Gain

3

Invert key

__init__(index, premultiplied=None, clip=None, gain=None, invert=None)
Parameters:
  • index – 0-indexed DSK number to control

  • premultipled – The new premultiplied state for the keyer, or None

  • clip – The new clip value for the keyer, or None

  • gain – The new gain value for the keyer, or None

  • invert – The new invert state for the keyer, or None

class pyatem.command.DkeyMaskCommand(index, enabled=None, top=None, bottom=None, left=None, right=None)

Implementation of the CDsM command. This controls the mask values for a downstream keyer.

Offset

Size

Type

Description

0

1

u8

Mask

1

1

u8

Downstream keyer index

2

1

bool

Mask enabled

3

1

?

unknown

4

2

i16

Mask Top

6

2

i16

Mask bottom

8

2

i16

Mask left

10

2

i16

Mask right

Bit

Mask value

0

Mask enabled

1

Top

2

Bottom

3

Left

4

Right

__init__(index, enabled=None, top=None, bottom=None, left=None, right=None)
Parameters:
  • index – 0-indexed DSK number to control

  • enabled – Enable or disable the mask, or None

  • top – The new top offset for the mask, or None

  • bottom – The new bottom offset for the mask, or None

  • left – The new left offset for the mask, or None

  • right – The new right offset for the mask, or None

class pyatem.command.CaptureStillCommand

Implementation of the Capt command. This saves the current frame of the program output into the media slots

Offset

Size

Type

Description

Upstream keyers

class pyatem.command.KeyOnAirCommand(index, keyer, enabled)

Implementation of the CKOn command. This enables an upstream keyer without having a transition.

Offset

Size

Type

Description

0

1

u8

M/E index, 0-indexed

1

1

u8

Keyer index

2

1

bool

Enabled

4

1

?

unknown

__init__(index, keyer, enabled)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • enabled – Set the keyer on-air or disabled

class pyatem.command.KeyTypeCommand(index, keyer, type=None, fly_enabled=None)

Implementation of the CKTp command. This sets the type of an upstream keyer.

Offset

Size

Type

Description

0

1

u8

Mask

1

1

u8

M/E index, 0-indexed

2

1

u8

Keyer index

3

1

u8

Keyer type

4

1

bool

Fly enabled

5

3

?

unknown

Bit

Mask value

0

Key type

1

Fly enabled

__init__(index, keyer, type=None, fly_enabled=None)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • type

  • fly-enabled

class pyatem.command.KeyFillCommand(index, keyer, source)

Implementation of the CKeF command. This enables an upstream keyer without having a transition.

Offset

Size

Type

Description

0

1

u8

M/E index, 0-indexed

1

1

u8

Keyer index

2

2

u16

Source index

__init__(index, keyer, source)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • source – Source index for the keyer fill

class pyatem.command.KeyCutCommand(index, keyer, source)

Implementation of the CKeC command. This sets the key source for an upstream keyer.

Offset

Size

Type

Description

0

1

u8

M/E index, 0-indexed

1

1

u8

Keyer index

2

2

u16

Source index

__init__(index, keyer, source)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • source – Source index for the keyer fill

class pyatem.command.KeyPropertiesLumaCommand(index, keyer, premultiplied=None, clip=None, gain=None, invert_key=None)

Implementation of the CKLm command. This sets the key source for an upstream keyer.

Offset

Size

Type

Description

0

1

u8

Mask

1

1

u8

M/E index, 0-indexed

2

1

u8

Keyer index

3

1

bool

Pre-multiplied

4

2

u16

Clip

6

2

u16

Gain

8

1

bool

Invert key

9

3

?

unknown

Bit

Mask value

0

Pre-multiplied

1

Clip

2

Gain

3

Invert key

__init__(index, keyer, premultiplied=None, clip=None, gain=None, invert_key=None)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • premultiplied

  • clip

  • gain

  • invert_key

class pyatem.command.KeyPropertiesDveCommand(index, keyer, size_x=None, size_y=None, pos_x=None, pos_y=None, rotation=None, border_enabled=None, shadow_enabled=None, border_bevel_enabled=None, outer_width=None, inner_width=None, outer_softness=None, inner_softness=None, bevel_softness=None, bevel_position=None, border_opacity=None, border_hue=None, border_saturation=None, border_luma=None, angle=None, altitude=None, mask_enabled=None, mask_top=None, mask_bottom=None, mask_left=None, mask_right=None, rate=None)

Implementation of the CKDV command. This sets the settings of the DVE in an upstream keyer

Offset

Size

Type

Description

0

1

u32

Mask

4

1

u8

M/E index, 0-indexed

5

1

u8

Keyer index

6

2

?

unknown

8

4

i32

Size x [0 - 9900]

12

4

i32

Size y [0 - 9900]

16

4

i32

Position x [-16000 - 16000]

20

4

i32

Position y [-9000 - 9000]

24

4

i32

Rotation

28

1

bool

Border enabled

29

1

bool

Shadow enabled

30

1

u8

Border bevel mode

31

1

?

unknown

32

2

u16

Border outer width [0 - 1600]

34

2

u16

Border inner width [0 - 1600]

36

1

u8

Border outer softness [0 - 100]

37

1

u8

Border inner softness [0 - 100]

38

1

u8

Border bevel softness [0 - 100]

39

1

u8

Border bevel position [0 - 100]

40

1

u8

Border opacity [0-100]

41

1

?

unknown

42

2

u16

Border color hue [0 - 3599]

44

2

u16

Border color saturation [0 - 1000]

46

2

u16

Border color luma [0 - 1000]

48

2

u16

Shadow light source angle [0 - 3590]

50

1

u8

Shadow light source altitude [10-100]

51

1

bool

Mask enabled

52

2

i16

Mask top [-9000 - 9000]

54

2

i16

Mask bottom [-9000 - 9000]

56

2

i16

Mask left [-16000 - 16000]

58

2

i16

Mask right [-16000 - 16000]

60

1

u8

Rate

61

3

?

unknown

Bit

Mask value

0

Size x

1

Size y

2

Position x

3

Position y

4

Rotation

5

Border enabled

6

Shadow enabled

7

Border bevel mode

8

Outer width

9

Inner width

10

Outer softness

11

Inner softness

12

Bevel softness

13

Bevel position

14

Border opacity

15

Border hue

16

Border saturation

17

Border luma

18

Shadow angle

19

Shadow altitude

20

Mask enabled

21

Mask top

22

Mask bottom

23

Mask left

24

Mask right

25

Rate

__init__(index, keyer, size_x=None, size_y=None, pos_x=None, pos_y=None, rotation=None, border_enabled=None, shadow_enabled=None, border_bevel_enabled=None, outer_width=None, inner_width=None, outer_softness=None, inner_softness=None, bevel_softness=None, bevel_position=None, border_opacity=None, border_hue=None, border_saturation=None, border_luma=None, angle=None, altitude=None, mask_enabled=None, mask_top=None, mask_bottom=None, mask_left=None, mask_right=None, rate=None)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • size_x

  • size_y

  • pos_x

  • size_y

  • rotation

  • border_enabled

  • shadow_enabled

  • border_bevel_enabled

  • outer_width

  • inner_width

  • outer_softness

  • inner_softness

  • bevel_softness

  • bevel_position

  • order_opacity

  • border_hue

  • border_saturation

  • border_luma

  • angle

  • altitude

  • mask_enabled

  • mask_top

  • mask_bottom

  • mask_left

  • mask_right

  • rate

class pyatem.command.KeyerKeyframeSetCommand(index, keyer, keyframe)

Implementation of the SFKF command. This sets the A or B keyframe for the flying key in the keyer.

Offset

Size

Type

Description

0

1

u8

M/E index, 0-indexed

1

1

u8

Keyer index

2

1

u8

keyframe, A = 1, B = 2

3

1

?

unknown

__init__(index, keyer, keyframe)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • keyframe – wether to store the A or B frame, set to ‘A’ or ‘B’

class pyatem.command.KeyerKeyframeRunCommand(index, keyer, run_to=None, set_infinite=None)

Implementation of the RFlK command. This makes the flying key run to full, A or B

Offset

Size

Type

Description

0

1

u8

Mask

1

1

u8

M/E index, zero indexed

2

1

u8

Keyer index, zero indexed

3

1

?

unknown

4

1

u8

Keyframe, 1=A, 2=B, 3=Full, 4=Infinite

5

1

u8

Ininite run index

6

2

?

unknown

__init__(index, keyer, run_to=None, set_infinite=None)
Parameters:
  • index – 0-indexed M/E number

  • keyer – 0-indexed keyer number

  • run_to

  • set_infinite

Mediaplayer

class pyatem.command.MediaplayerSelectCommand(index, still=None, clip=None)

Implementation of the MPSS command. This sets the still or clip from the media pool to load into a mediaplayer

Offset

Size

Type

Description

0

1

u8

Mask

1

1

u8

Mediaplayer index

2

1

u8

Source type, 1=still, 2=clip

3

1

u8

Still index

4

1

u8

Clip index

5

3

?

padding

__init__(index, still=None, clip=None)
Parameters:
  • index – Mediaplayer index

  • still – Still index to load

  • clip – Clip index to load

Fade to black

class pyatem.command.FadeToBlackConfigCommand(index, frames)

Implementation of the FtbC command. This sets the duration for the fade-to-black block

Offset

Size

Type

Description

0

1

u8

Mask, always 1

1

1

u8

M/E index

2

1

u8

frames

3

1

?

unknown

__init__(index, frames)
Parameters:
  • index – 0-indexed M/E number to configure FTB for

  • frame – Number of frames in the FTB transition