WebDecoder Public API - REST Interface for Video Decoder Control
The WebDecoder API provides a simple REST interface for external applications to control web-based video decoders. This API allows you to decode web content (URLs) and output to SDI hardware using simple integer-based indexing.
Base URL: http://your-server:port/api/WebDecoder
Content-Type: application/json
The API uses simple zero-based integer indices instead of internal device IDs:
0 = first/top device, 1 = second device, etc.0 = first available output port, 1 = second available output, etc.Start a web decoder on a specific device and output port.
{
"deviceIndex": 0,
"outputIndex": 0,
"url": "https://example.com",
"width": 1920,
"height": 1080,
"framerate": 50.0,
"interlacedOutput": true,
"enableKey": true
}
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
deviceIndex |
integer | Yes | 0 | Device index (0 = first device) |
outputIndex |
integer | Yes | 0 | Output port index (0 = first available output) |
url |
string | Yes | - | URL to decode (e.g., https://example.com) |
width |
integer | Yes | 1920 | Video width in pixels (must be > 0) |
height |
integer | Yes | 1080 | Video height in pixels (must be > 0) |
framerate |
number | Yes | 50.0 | Framerate in fps (must be > 0) |
interlacedOutput |
boolean | No | false | Enable interlaced output (false = progressive) |
enableKey |
boolean | No | false | Enable fill+key output (uses 2 consecutive ports) |
enableKey is true:
outputIndex specifies the fill port (first port){
"message": "WebDecoder started successfully",
"deviceIndex": 0,
"deviceId": "DeckLink_4K_Extreme_12G_00000000",
"deviceInfo": "Blackmagic DeckLink 4K Extreme 12G",
"outputIndex": 0,
"outputPorts": [2, 3],
"mode": "Fillkey",
"usedOutputs": 2,
"settings": {
"url": "https://example.com",
"resolution": "1920x1080",
"framerate": 50.0,
"interlaced": false,
"keyOutput": true
}
}
Stop a running web decoder on a specific device and output port.
| Parameter | Type | Description |
|---|---|---|
deviceIndex |
integer | Device index (0 = first device) |
outputIndex |
integer | Output index of the active decoder to stop |
{
"message": "WebDecoder stopped successfully",
"deviceIndex": 0,
"deviceId": "DeckLink_4K_Extreme_12G_00000000",
"outputIndex": 0,
"stoppedPorts": [2, 3],
"mode": "Fillkey"
}
Update the URL of a running web decoder without stopping/restarting (seamless transition).
| Parameter | Type | Description |
|---|---|---|
deviceIndex |
integer | Device index (0 = first device) |
outputIndex |
integer | Output index of the active decoder to update |
{
"url": "https://new-url.com"
}
{
"message": "WebDecoder URL updated successfully",
"deviceIndex": 0,
"deviceId": "DeckLink_4K_Extreme_12G_00000000",
"outputIndex": 0,
"updatedPorts": [2, 3],
"mode": "Fillkey",
"newUrl": "https://new-url.com"
}
Complete model for starting a web decoder:
{
deviceIndex: number; // 0-based device index
outputIndex: number; // 0-based output port index
url: string; // URL to decode
width: number; // Video width (pixels, > 0)
height: number; // Video height (pixels, > 0)
framerate: number; // Framerate (fps, > 0)
interlacedOutput: boolean; // false = progressive, true = interlaced
enableKey: boolean; // false = fill only, true = fill+key
}
Model for updating a decoder's URL:
{
url: string; // New URL to navigate to
}
All error responses follow this format:
{
"error": "Error category",
"message": "Detailed error message"
}
Or simplified:
{
"message": "Error message"
}
{
"message": "Device index 5 out of range. Available devices: 0-2"
}
{
"message": "Output index 3 out of range. Available outputs on device 0: 0-1"
}
{
"message": "Fill+Key output requires at least 2 available outputs, but only 1 available on device 0"
}
{
"message": "No active web decoders found on device 0 (Blackmagic DeckLink 4K Extreme 12G)"
}
POST /api/WebDecoder/simple/start
Content-Type: application/json
{
"deviceIndex": 0,
"outputIndex": 0,
"url": "https://example.com",
"width": 1920,
"height": 1080,
"framerate": 50.0,
"interlacedOutput": false,
"enableKey": false
}
{
"message": "WebDecoder started successfully",
"deviceIndex": 0,
"deviceId": "DeckLink_4K_Extreme_12G_00000000",
"deviceInfo": "Blackmagic DeckLink 4K Extreme 12G",
"outputIndex": 0,
"outputPorts": [2],
"mode": "Single",
"usedOutputs": 1,
"settings": {
"url": "https://example.com",
"resolution": "1920x1080",
"framerate": 50.0,
"interlaced": false,
"keyOutput": false
}
}
POST /api/WebDecoder/simple/start
Content-Type: application/json
{
"deviceIndex": 0,
"outputIndex": 0,
"url": "https://graphics.example.com",
"width": 1920,
"height": 1080,
"framerate": 50.0,
"interlacedOutput": true,
"enableKey": true
}
POST /api/WebDecoder/simple/update-url/0/0
Content-Type: application/json
{
"url": "https://new-content.example.com"
}
POST /api/WebDecoder/simple/stop/0/0
POST /api/WebDecoder/simple/startPOST /api/WebDecoder/simple/update-url/{deviceIndex}/{outputIndex}POST /api/WebDecoder/simple/stop/{deviceIndex}/{outputIndex}outputIndex refers to active decoders (which are re-indexed after each stop operation).
For issues or questions about the API, please refer to the main SDIWare documentation or contact support.
Version: 1.0
Last Updated: 2025
API Base Path: /api/WebDecoder