HyperDeck APIs

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

DylanReeve

  • Posts: 12
  • Joined: Sun Sep 22, 2013 10:34 am

HyperDeck APIs

PostWed May 01, 2024 7:41 am

I posted in the Live Production board, and made some progress: viewtopic.php?f=4&t=200575

Essentially the HyperDeck manual seems to be missing some details around the new REST protocol (although I've now found that the endpoint is /control/api/v1) and also the WebSocket implementation.

So having resolved the REST issue, I'm still in the dark on the WebSocket interface.

I can't figure out how to establish a connection - there's nothing in the manual to clarify the WebSocket endpoints and I've been unable to find anything with guessing so far.

Can anyone clarify the endpoints? Some working demo code would be even better!
Offline

DylanReeve

  • Posts: 12
  • Joined: Sun Sep 22, 2013 10:34 am

Re: HyperDeck APIs

PostThu May 02, 2024 6:32 am

The WebSocket endpoint is: /control/api/v1/event/websocket

This was figured out via the Camera documentation, specifically the Notification.yaml file - that is lacking in the HyperDeck's /control/documentation.html list for some reason, but the camera one can be viewed here: https://gist.github.com/GarthDB/10ec325 ... ation-yaml
Offline

DylanReeve

  • Posts: 12
  • Joined: Sun Sep 22, 2013 10:34 am

Re: HyperDeck APIs

PostThu May 02, 2024 6:49 am

And, because the subscribe message structure also isn't defined, here's what I've got working so far:

{
"type": "request",
"data": {
"action": "subscribe",
"properties": [
"/system"
]
}
}

This will subscribe for updates to the system format.

According to the /event/list API call, these are the events that can be subscribed to:
"/media/active",
"/media/external",
"/media/external/selected",
"/media/nas/bookmarks",
"/media/nas/discovered",
"/media/workingset",
"/system",
"/system/codecFormat",
"/system/product",
"/system/supportedVideoFormats",
"/system/videoFormat",
"/timelines/0",
"/timelines/0/videoFormat",
"/transports/0",
"/transports/0/clipIndex",
"/transports/0/inputVideoFormat",
"/transports/0/inputVideoSource",
"/transports/0/play",
"/transports/0/playback",
"/transports/0/record",
"/transports/0/stop",
"/transports/0/timecode",
"/transports/0/timecode/source"
Online
User avatar

roger.magnusson

  • Posts: 3411
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: HyperDeck APIs

PostThu May 02, 2024 7:43 pm

I've used the Camera WebSocket successfully, looks like they have the same message types and URLs.

I did encounter an issue where it won't work if your subscribe message is "too big", as in if I want to subscribe to each individual property in one request. You can solve that by using an asterix, like [ "*" ] or [ "/media*", "/timeline*" ].
Offline

DylanReeve

  • Posts: 12
  • Joined: Sun Sep 22, 2013 10:34 am

Re: HyperDeck APIs

PostSat May 04, 2024 11:13 pm

I haven't done a lot of testing yet, but what I have found is that the data on the websocket (at least the Codec reporting) isn't always accurate.

When changing the codec using the front panel, for example, it will report a change, but sometimes it reports the old setting, not the new one.

I'm guessing there's some sort of race condition internally where the notification engine is being told about a change happening before the setting has actually been stored, so it's notifying the current setting not the new one.

Not sure how to officially log a bug though?
Offline

Ian Morrish

  • Posts: 582
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: HyperDeck APIs

PostWed May 15, 2024 9:11 am

Dev manual for the api is here
https://www.blackmagicdesign.com/develo ... d-software

Sent from my 21081111RG using Tapatalk
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 5 guests