ATEM mini HTTP interface?

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

markmc

  • Posts: 8
  • Joined: Thu Jun 11, 2020 7:35 pm
  • Real Name: Mark McMillan

ATEM mini HTTP interface?

PostThu Jul 23, 2020 3:05 pm

Is there any way to communicate with the ATEM mini via HTTP? In particular I want to query (and maybe control) the mini via a web interface using Javascript. HTTP is the most natural protocol for Javascript, but raw IP might also be possible.

Background: We are using OBS with 3 PTZOptics cameras. We use the OBS custom browser dock feature to embed camera control panels into the OBS interface:

Image

I would like a "tally" indicator on the camera control panel so it is clear to the operator which camera is currently "live". (We are using the physical buttons on the ATEM mini for switching). E.g. light up the title bar of a camera's dock in red when it is live - a caution signal to the operator that any camera movement will be seen in the live stream.

To do that, I need to get tally information from the ATEM mini into a browser running Javascript (each custom dock panel in OBS is a web browser page).

Is there any conceivable way to do this? The BM Switchers SDK is all C++ and hides the on-network protocol, not accessible from Javascript in any way.
Offline
User avatar

Fred Rodrigues

  • Posts: 354
  • Joined: Mon Nov 05, 2012 9:00 am
  • Location: Amsterdam

Re: ATEM mini HTTP interface?

PostThu Jul 23, 2020 3:45 pm

Hey, the ATEM protocol is UDP, this is not widely accessible in browsers, and there is no HTTP interface for the ATEM API. There are some 3rd party libraries that have decoded the raw UDP communication from the API, you can use UDP sockets in chrome but that would require a bit of coding, to make the UDP library in chrome sockets friendly format.

Someone has done something close with nodejs here: http://nelsoj.uk/demonstration-of-a-web ... ch-source/

There are also some QT libraries for the ATEM series online as well.

There are also quite a few variations of abstraction layers others have made on github

https://github.com/topics/atem

All in all there are some options to do what you want but nothing accessible directly through HTTP as the system uses UDP and will always require at least a layer of abstraction, and some work to get it going. The work others have already done might be enough to get you going though.
http://www.fredrodrigues.net/
Offline

markmc

  • Posts: 8
  • Joined: Thu Jun 11, 2020 7:35 pm
  • Real Name: Mark McMillan

Re: ATEM mini HTTP interface?

PostFri Jul 24, 2020 1:36 pm

Ah, there are several bits on github there that could be a basis for what I need, most Javascript tools are using nodejs and the dgram library. Not sure what level of Javascript is supported in the OBS browser docks so I may have some issues there. Other option is to run (in a separate process) an HTTP server that does the talking to the switcher and use plain 'ol ajax calls in the Javascript. Tempted to write my own HTTP server in Java which has good UDP support and runs everywhere, but would have to implement the ATEM protocol layer myself (using existing C# and JS as examples).

So, I have something to work on for a while :-) Thanks for the pointers.

(Aside: I know there must already be a lot of code running in the switcher... but how hard is it to implement a simple HTTP server these days? It would open up so many possibilities for integrations, tools, and utilities that would be simple and reliable - and get them out of the protocol implementation business.)
Offline

pedrofsn

  • Posts: 1
  • Joined: Wed Sep 16, 2020 2:09 pm
  • Real Name: Pedro Neto

Re: ATEM mini HTTP interface?

PostWed Sep 16, 2020 2:40 pm

API interface can be a great feature to be implemented in ATEM mini.
For me it could be used to develop a several resources like a phone camera switchers or indicator cameras usages to camera staff, using android apps connected in some server integrated locally with API.
Offline

Steve Kanefsky

  • Posts: 106
  • Joined: Wed Oct 14, 2015 10:27 pm

Re: ATEM mini HTTP interface?

PostWed Sep 16, 2020 6:17 pm

Bitfocus Companion is open source and can be used to control the ATEM Mini along with many other things. You can use its web interface or use it with a Stream Deck to have physical buttons or you can control it by sending it HTTP commands which would thus allow you to control the ATEM (indirectly) using HTTP.

https://bitfocus.io/companion

Return to Live Production

Who is online

Users browsing this forum: No registered users and 22 guests