The Daemon

Intro

If you’re not using the provided Python or ExtendScript API, you can control DuME through a simple TCP Socket to send requests to the DuME Daemon.

By default, the Daemon listens on port 180551 but this can be changed in the DuME settings, or starting DuME with $ DuME --port 12345.

To query the Daemon, write simple JSON objects to the socket.

These objects must contain at least a string value called query, and may have an object value called data with the needed details about the query.

The Daemon replies with a JSON object containing a boolean value called error and an object or array value called data with the result of the query. The reply also contains the name and version of the Daemon.

Replies and Errors

In case of error, the Daemon sets the error value to true.

The data object contains details about the error:

Example

{
    "error": true,
    "data": {
        "errorType": "EmptyQuery",
        "errorDescription": "The query is not set."
    },
    "dume": "DuME",
    "version": "1.0.0"
}

Requests

createGraph

Creates a new DuME Graph / Render Job.

Input metadata can be given inline or using sidecar metadata JSON files.

{
    "query": "createGraph",
    "data": {
        "input": ["...", "..."],
        "meta": [ {}, {} ],
        "metaFiles": [ "...", "..." ],
        "output": "...",
        "preset": "...",
    }
}
{
    "error": false,
    "data": {},
    "dume": "DuME",
    "version": "1.0.0"
}

getColorProfiles

Lists the available internal color profiles. This does not include the OCIO profiles that your app should get from the OCIO config file.

{
    "query": "getColorProfiles"
}
{
    "error": false,
    "data": [
        {
            "description": "...",
            "name": "..."
        },
        {
            "description": "...",
            "name": "..."
        }
    ],
    "dume": "DuME",
    "version": "1.0.0"
}

getPresets

Lists the available presets.

{
    "query": "getPresets",
    "data": {
        "nodeType": "...",
        "filterType": "..."
    }
}
{
    "error": false,
    "data": [
        {
            "filterType": "...",
            "name": "...",
            "nodeType": "..."
        },
        {
            "filterType": "...",
            "name": "...",
            "nodeType": "..."
        }
    ],
    "dume": "DuME",
    "version": "1.0.0"
}

openGraph

Opens a DuME Graph / Render Job.
The graph can be an existing *.dume file or the actual JSON data of a graph, as it would be saved by DuME. Read the DuME file specs for more information about the JSON data of DuME graphs.

Placeholders can be replaced by input files.

Input metadata can be given inline or using sidecar metadata JSON files.

Note: either graph or graphData must be set; if both are set, the file path has priority.

{
    "query": "openGraph",
    "data": {
        "graph": "...",
        "graphData": {},
        "meta": [ {}, {} ],
        "metaFiles": [ "...", "..." ],
        "replace": [
            { "placeholder": "...", "path": "..." },
            { "placeholder": "...", "path": "..." }
        ]
    }
}
{
    "error": false,
    "data": {},
    "dume": "DuME",
    "version": "1.0.0"
}

ping

Returns some information about DuME and the Daemon. Use this query to make sure the Daemon is running and you can contact it.

{
    "query": "ping"
}
{
    "error": false,
    "data": {
        "appDescription": "DuME - Duduf Media Encoder",
        "appName": "DuME",
        "version": "1.0.0"
    },
    "dume": "DuME",
    "version": "1.0.0"
}

render

Launches the render queue.

{
    "query": "render",
    "data" {
        "autoQuit": false
    }
}
{
    "error": false,
    "data": {},
    "dume": "DuME",
    "version": "1.0.0"
}

  1. This was chosen after the birth date of Karl Marx, May 5, 1818.