Flow transform
Create a flow transform that performs a decode from h.264 to SDI baseband:
PUT <<APIURL>>/api/projects/<<PROJECTNAME>>/v1/flow/transforms/h264-decode
{
"metadata": {
"displayName": "Decode"
},
"spec": {
"type": "Decode",
"decoding": {
"version": "1.61",
"resourceType": "HDSD",
"inputs": [
{
"autoSelectAudios": true,
"bissCa": false,
"bissKey": "",
"bissKeyId": "None",
"bissMode": "None",
"ca": {
"streams": []
},
"camSlot": "none",
"delayMode": "Standard",
"director6DescramblingEnable": false,
"director6HwId": "none",
"director6OacEnable": false,
"directorHwId": "none",
"id": "input_1",
"oacEnable": false,
"programNumber": "0",
"redundancy": {
"maxSkew": "50",
"mode": "none",
"signalLossTimeout": "500"
},
"sources": [
{
"id": "source_1"
}
],
"streams": [
{
"id": "TS_1",
"type": "mpeg2ts"
},
{
"id": "Video_1",
"preprocessing": {
"crosstalkFilter": false,
"diamondDenoisingFilter": "off",
"spatialDenoisingFilter": "off"
},
"source": {
"pid": "auto",
"type": "video"
},
"type": "video"
},
{
"id": "Audio_1",
"preprocessing": {
"audioOutChannels": "stereo",
"downmixedChannelsCompressionMode": "line"
},
"source": {
"languages": [
"auto"
],
"pid": "auto",
"type": "audio"
},
"type": "audio"
}
]
}
],
"outputs": [
{
"id": "output_1",
"mediaTransport": "sdi",
"sdi": {
"afdLine": "11",
"ccLine": "11",
"clockReference": "FreeRunning",
"dynamicRangeConversion": "None",
"dynamicRangeSignalling": "FollowInput",
"externalSyncOffset": "0",
"linkMode": "Quadrant",
"op47Line": "OFF",
"outputSdi3GLevel": "levelA",
"smpte2022": [],
"smpte2031Line": "OFF",
"streams": [
{
"id": "Video_1_out_1",
"input": "Video_1_dec_1",
"type": "video"
},
{
"id": "Audio_output_1_1",
"input": "Audio_1_dec_1",
"type": "audio",
"embedding": "1",
"lipSyncOffset": "0"
}
],
"videoConversion": "noconversion",
"videoFailMode": "freezeFrame",
"vitcLine": "9",
"splicingLine": "OFF",
"splicingConfig": {
"clampPreRoll": true,
"eventIdFilter": {
"enable": false,
"mask": "0x00000000",
"value": "0x00000000"
}
}
}
}
],
"processings": [
{
"exportType": "sdi",
"id": "processing_1",
"streams": [
{
"id": "Video_1_dec_1",
"input": "Video_1",
"codec": "none",
"type": "video"
},
{
"id": "Audio_1_dec_1",
"input": "Audio_1",
"codec": "none",
"type": "audio"
}
]
}
]
}
}
}
Flow
Create a flow that takes the 'camera-north-1' content in and outputs to the 'camera-north-1-studio-sdi' destination:
PUT https://api.mk.io/api/projects/myproject/v1/flow/flows/cn1-studio
{
"metadata": {
"displayName": "Camera North 1 - Studio",
},
"spec": {
"state": "Running",
"siteName": "studio",
"transformName": "h264-decode",
"inputs": [
{
"contentName": "camera-north-1",
"transformInput": "encoding/input_1"
}
],
"outputs": [
{
"transformOutput": "encoding/output_1",
"destinationName": "camera-north-1-studio-sdi"
}
]
}
}
The flow input connects the 'camera-north-1' content to the 'encoding/input_1/source_1' flow transform input. The flow output connects the 'encoding/output_1' flow transform output to the 'camera-north-1-studio-sdi' destination. The diagram below demonstrates the connections.

downstream encode flow
In this case the 'camera-north-1' content comes from the 'cn1-stadium' upstream flow instead of a source. This is because the 'camera-north-1-primary' source is not available to the 'studio' site directly; the device with that SDI interface is on the 'stadium' site.
The 'cn1-stadium' upstream flow makes the 'camera-north-1' content available on an internal flow output on a site/device that is connected to the 'wan' network. The 'cn1-studio' downstream flow is also on a site/device that is connected to the 'wan' network. Therefore the content required by the 'cn1-studio' flow's input can be resolved to the internal flow output of the 'cn1-stadium' flow.
Once the 'cn1-studio' flow is created, the content should stream from the 'camera-north-1-primary' source to the 'camera-north-1-studio-sdi' destination.
Troubleshooting
If the content does not get to the 'camera-north-1-studio-sdi' destination, check the status of the upstream and downstream flows by getting the resources.
Upstream stadium flow
Get the stadium flow with:
GET https://api.mk.io/api/projects/myproject/v1/flow/flows/cn1-stadium
Check:
- the source has been assigned (i.e. the content has been resolved) by looking at the
status.inputs[0].sourceName
field; - the device has been assigned by looking at the
status.assignedDevice
field, and - the
status.state
field indicates 'Running'.
Downstream studio flow
Get the studio flow with:
GET https://api.mk.io/api/projects/myproject/v1/flow/flows/cn1-studio
Check:
- the upstream flow has been assigned (i.e. the content has been resolved) by looking at the
status.inputs[0].upstreamFlowName
field; - the device has been assigned by looking at the
status.assignedDevice
field, and - the
status.state
field indicates 'Running'.