pycaspar package

Submodules

pycaspar.channel module

class pycaspar.channel.Channel(caspar_instance, channel_id)[source]
clear()[source]

Clear channel and all layers on channel.

framerate

Query server and return the frame rate of the channel.

id

Get channel integer id as used by Caspar internally.

layer(layer_id)[source]

Get a Caspar Layer object for the given numeric layer ID :param int layer_id: Layer ID

name

pycaspar.layer module

class pycaspar.layer.Layer(caspar_instance, channel_id, layer_id)[source]

Create a Caspar Layer object.

Parameters:caspar_instance (pycaspar.CasparCG) – Caspar instance
clear()[source]

Clears layer by sending a CLEAR command.

id

Get layer integer id as used by Caspar internally.

name

Return the Caspar-internal name for the current layer.

play(filename, transition=None, loop=False, seek=False)[source]

Play a given resource on the layer.

Parameters:

Module contents

class pycaspar.CasparCG(hostname, amcp_port=5250)[source]

Open a connection to a CasparCG instance.

Parameters:
  • hostname (string) – Host name of Caspar server.
  • amcp_port (int) – Port number for AMCP connection.
channel(channel_id)[source]

Create and return a Channel object corresponding to channel ID number.

Parameters:channel_id (int) – Channel ID number.
channels

Query the server and return a list of channels.

layer(channel_id, layer_id)[source]

Create and return a Layer object corresponding to channel and layer ID numbers.

Parameters:
  • channel_id (int) – Channel ID number.
  • layer_id (int) – Layer ID number.
layers

Query the server and return a list of layers.