Switch a Magewell Director Mini scene over HTTP
TL;DR. Director Mini firmware 3.0 takes HTTP GET or POST. /V1.0/scene/switchByIndex?index=1&switchEffect=1 fades to that scene. The demo host uses port 8080.
This is a commercial product. AgentOnStage isn't paid for this listing.
Commercial productLED/VideoIntermediateMagewell Director MiniHTTP
What it does
Magewell's Director Mini API document says the calls apply to Director Mini firmware 3.0. They are HTTP, and each section accepts POST or GET. The introduction calls them lightweight connectionless interfaces without response data. One later section does print a JSON body: getSceneList. The status table is HTTP 200 for success, 400 when the request has a syntax error or a required parameter is missing, 403 when the server understood the request and refuses it because the content does not exist or the operation is prohibited, and 404 when the interface path is written incorrectly.
The path in each section is http://ip/V1.0/... with no port. The command-line demo uses http://10.10.3.21:8080. That demo's introduction says the cookie file lives in a different place on each operating system. The four printed wget and curl lines do not pass a cookie.
POST/GET http://ip/V1.0/scene/getSceneList is the scene list. The printed body has sceneList entries with name and uuid, totalCount 8, message SUCCESS, and status 0. status 0 in that table is success. Names in the sample include PICTURE, HDMI 1, HDMI 2, Camera #1, and Hamedal C10.
POST/GET http://ip/V1.0/scene/switchByIndex?index=1&switchEffect=1 switches by index. The parameter text says the index can be 1, 2, and so on. switchEffect 0 is Cut and 1 is Fade. The page says that parameter is non-essential, and that leaving it off uses the preset transitions in Switch Settings. The wget demo on port 8080 is switchByIndex?index=0, which is not the 1 in the parameter table. switchByName uses name=scene1. switchByUUID uses a uuid such as 17170511950740.
POST/GET http://ip/V1.0/scene/previewToPGM?switchEffect=1 switches the preview scene to program, with the same 0 Cut and 1 Fade values. POST/GET http://ip/V1.0/scene/next goes to the next scene. POST/GET http://ip/V1.0/record/start starts recording and POST/GET http://ip/V1.0/record/stop stops it. POST/GET http://ip/V1.0/stream/actionByIndex?index=1&start=true starts the stream server at that index. The page says start is non-essential, and that without it the device automatically starts or stops streaming. controlYouTubeLive is also non-essential, only affects YouTube, and defaults to false. POST/GET http://ip/V1.0/stream/stopAll stops every ongoing stream. The stream-server list sample names YouTube, Twitch, Facebook Live, NDI, RTMP Server, and SRT Caller, and the type table is 1 YouTube, 2 Twitch, 3 Facebook, 4 RTMP, 5 SRT, and 6 NDI.
Play and record a Blackmagic HyperDeck over Ethernet is a different recorder.
How to set it up
- Confirm the unit is a Director Mini on firmware 3.0, which is the version this document names. Use HTTP GET or POST. The section headings omit the port. The printed demo is
http://10.10.3.21:8080. - Call
/V1.0/scene/getSceneListbefore you switch. Readname,uuid, andtotalCount. Treat HTTP 200 as success. HTTP 400 is a bad or incomplete query. HTTP 403 is a refusal. HTTP 404 is a wrong path. - Switch with
/V1.0/scene/switchByIndex?index=1&switchEffect=1for a fade, orswitchEffect=0for a cut. The parameter text counts indexes from 1. The demo wget line usesindex=0. Prefer the index you just read over either example if they disagree. - Take preview to program with
/V1.0/scene/previewToPGM?switchEffect=1. Start a recording with/V1.0/record/startand stop it with/V1.0/record/stop. - Start stream index 1 with
/V1.0/stream/actionByIndex?index=1&start=true. LeavecontrolYouTubeLiveoff unless that server is YouTube. The documented default is false./V1.0/stream/stopAllstops every stream.
Source: Director Mini API, firmware 3.0.
FAQ
Is the scene index 0 or 1?
The switchByIndex section's request line uses index=1, and the parameter text says 1, 2, and so on. The command-line demo on port 8080 uses index=0. Read getSceneList and use the index that list implies for the scene you want.
Does every call return JSON?
The introduction says these interfaces are without response data. getSceneList is the section that prints a JSON body, including status 0 and message SUCCESS. The other scene calls in this page list only an HTTP status code.
What does HTTP 403 mean here?
The status table says the server understood the request and refuses to execute it. The reason it gives is that the content does not exist or the operation is prohibited. HTTP 404 is a path that was written incorrectly.
Also on this rig
Original source: https://www.magewell.com/api-docs/director-mini-api/director-mini-api-en_US.pdf