Skip to content
Hunter Fuller edited this page Oct 25, 2019 · 1 revision

tallyd

Disclaimer

Tallyd does not exist. This is just a writeup of a theoretical piece of software.

What is tally?

It's a light that lets people behind and in front of a camera know that the camera is being used for the live broadcast (red) or that the technical director is considering using it (green).

Plannned Architecture

The tally distribution architecture consists of three main parts:

  • Tally exporters: these provide tallyd with information about which cameras should show tally. It's basically an adapter between the production switcher and tallyd.
    • atem2tallyd - for Blackmagicdesign ATEM switchers
    • obs2tallyd - for Open Broadcaster Software/OBS Studio
  • Tallyd (this app): Keeps track of tally based on input from tally exporter(s) and tells tally clients about any changes.
  • Tally clients: devices that actually show red/green lights in response to commands from tallyd.

Requirements for tallyd

  • Basics
    • Tallyd maintains internal state regarding which cameras have tally, and what type of tally that is.
    • You set the names for the types of tally in the tallyd config file. Order is significant.
      • ["live", "preview", "something else"]
      • There will never be more than 8 types of tally.
    • You set how many possible tally lamps there are in the tallyd config file.
    • When tallyd starts, nothing has tally. Every tally lamp is off.
    • Tallyd has a Flask web server. It doesn't have to do anything, and does not have to be used for the exporter interface, even though it could be. But it has to work, because I want to use this server to add other functionality later.
  • Tally exporter interface
    • Tally exporters connect to tallyd, not the other way around.
    • Tally exporters send commands to set the tally state of exactly one camera at a time.
      • Toggling is not a thing.
      • The exporter uses the name of the type of tally (string) to identify which type of tally it wants to turn on for this input. If the string is "off" then there is no tally for this input right now. This is not a type of tally, it just turns off any type that might be active. It's a hardcoded string.
  • Tally client
    • This is a very very simple piece of software that runs on a really slow device. It knows that the first type of tally is red, the second type of tally is green, and the third type of tally is blue.
    • These devices connect to tallyd, not the other way around.
    • To connect to tallyd, these devices open a tcp socket.
    • Whenever the stally state changes for any camera, tallyd sends a tally update to all tally clients.
    • Whenever a tally client sends a line (ending in 0x0a) to tallyd, tallyd throws that line in the garbage and immediately sends that specific client a tally update.
    • To send a tally update, tallyd sends a line that looks like this:
      • [0x02][byte for camera 1 with a single bit set for the activated tally type][repeat last byte for however many cameras there are][0x0a]
      • Example packet where there are 3 cameras. Camera 1 is live, Camera 2 is being previewed, and Camera 3 has no tally: [0x02][0x01][0x02][0x00][0x0a]
Clone this wiki locally