Developer
Log in

Actions

Graphics cards

2 actions in the Graphics cards group. Each is its own JSON-RPC method, and also runs through action.run.

gpu.draw_onDraw scenes on

Chooses the graphics card Studio draws its scenes on (Settings › Graphics cards), apart from the one it encodes on: auto (what Studio picks itself) or a card. Applies at once when nothing is streaming or recording (the preview, the virtual camera and a replay buffer hold their picture for about a second while it moves), else as soon as the stream and recording have stopped. Studio keeps the choice; a card that's gone later is drawn on as auto, said once.

Keyscope: manage

Parameters

  • cardgraphics_cardrequired

    auto, or the card: its key from the gpus topic (pci:05:00.0), or its name when only one card has it. Give auto, or a card's key (pci:05:00.0) or name from the gpus topic.

    Choices in gpus

Result

  • appliesDrawApplies (string)always

    now (the renderer moved), when_off_air (once the stream and recording stop) or at_start (Studio's renderer hasn't started).

    One of "now" "when_off_air" "at_start"

  • draw_onstringalways

    Draw scenes on now: auto, or the card's key.

Live state

gpus.draw_on string

auto, or the chosen card's key. From the gpus topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gpu.draw_on",
  "params": {
    "card": "<card>"
  }
}

In the SDKs

C#
Task<GpuDrawOnResult> GpuDrawOnAsync(GpuDrawOnParams parameters, CancellationToken cancellationToken = default)
TypeScript
gpuDrawOn(params: GpuDrawOnParams): Promise<GpuDrawOnResult>
Python
async def gpu_draw_on(self, *, card: str) -> GpuDrawOnResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "card": {
        "description": "auto, or the card: its key from the gpus topic (pci:05:00.0), or its name when only one card has it. Give auto, or a card's key (pci:05:00.0) or name from the gpus topic.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "card"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "applies": {
        "description": "now (the renderer moved), when_off_air (once the stream and recording stop) or at_start (Studio's renderer hasn't started).",
        "enum": [
          "now",
          "when_off_air",
          "at_start"
        ],
        "title": "DrawApplies",
        "type": "string"
      },
      "draw_on": {
        "description": "Draw scenes on now: auto, or the card's key.",
        "type": "string"
      }
    },
    "required": [
      "draw_on",
      "applies"
    ],
    "type": "object"
  }
}

gpu.encode_onEncode on

Chooses the graphics card whose hardware encoder (NVENC, AMD AMF, Intel Quick Sync, VA-API) every stream and recording encodes with (Settings › Graphics cards), apart from the card that draws: auto (the first hardware encoder that opens, where its driver puts it), software (x264 on the CPU) or a card. Applies to each stream and recording started from then on; ones running keep their encoder. A destination set to its own encoder keeps it.

Keyscope: manage

Parameters

  • cardgraphics_cardrequired

    auto, software, or the card: its key from the gpus topic (pci:05:00.0), or its name when only one card has it. Give auto, or a card's key (pci:05:00.0) or name from the gpus topic.

    Choices in gpus

Result

  • appliesEncodeApplies (string)always

    next_encode: streams and recordings started from now on.

    One of "next_encode"

  • encode_onstringalways

    Encode on now: auto, software, or the card's key.

Live state

gpus.encode_on string

auto, software, or the chosen card's key. From the gpus topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gpu.encode_on",
  "params": {
    "card": "<card>"
  }
}

In the SDKs

C#
Task<GpuEncodeOnResult> GpuEncodeOnAsync(GpuEncodeOnParams parameters, CancellationToken cancellationToken = default)
TypeScript
gpuEncodeOn(params: GpuEncodeOnParams): Promise<GpuEncodeOnResult>
Python
async def gpu_encode_on(self, *, card: str) -> GpuEncodeOnResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "card": {
        "description": "auto, software, or the card: its key from the gpus topic (pci:05:00.0), or its name when only one card has it. Give auto, or a card's key (pci:05:00.0) or name from the gpus topic.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "card"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "applies": {
        "description": "next_encode: streams and recordings started from now on.",
        "enum": [
          "next_encode"
        ],
        "title": "EncodeApplies",
        "type": "string"
      },
      "encode_on": {
        "description": "Encode on now: auto, software, or the card's key.",
        "type": "string"
      }
    },
    "required": [
      "encode_on",
      "applies"
    ],
    "type": "object"
  }
}

to open · ↑ ↓ to move · Esc to close