# Get Media Length

## Overview

![The Get Media Length Node when Object and Seconds are selected in the Attributes.](/files/A09XhFiRPXyu6CjsTfUM)

The **Get Media Length Node** returns the duration of a **Media Object** or **Asset** either in `Seconds` (**Video** & **Audio**) or in `Frames` (**Video** only). The **Node's** input and output change depending on what is selected in its **Attributes**.

[**Scope**](/incari-studio/2024.1/toolbox/overview.md#scopes): **Scene**, **Function**, **Prefab**.

## Attributes

![The Get Media Length Node Attributes.](/files/Nvl4VNJn9sIGN4NOkFPk)

| Attribute    | Type         | Description                                                                                                                                                                                     |
| ------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Input Type` | **Dropdown** | Gives the options for the **Node's** input type. It can be either `Object` or `Asset`. Selecting `Object` will lead to an `Object ID` input. Selecting `Asset` will lead to a `Media ID` input. |
| `Format`     | **Dropdown** | Gives the options for the **Node's** output type. It can be either `Seconds` or `Frames`.                                                                                                       |

## Inputs

The **Attributes** decide whether `Object ID` or `Media ID` appears as input.

{% tabs %}
{% tab title="Object" %}

| Input             | Type         | Description                                                                    |
| ----------------- | ------------ | ------------------------------------------------------------------------------ |
| *Pulse Input* (►) | **Pulse**    | A standard **Input Pulse**, to trigger the execution of the **Node**.          |
| `Object ID`       | **ObjectID** | The ID of the desired **Media Object** whose duration length will be returned. |
| {% endtab %}      |              |                                                                                |

{% tab title="Asset" %}

| Input             | Type        | Description                                                                   |
| ----------------- | ----------- | ----------------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**   | A standard **Input Pulse**, to trigger the execution of the **Node**.         |
| `Media ID`        | **AssetID** | The ID of the desired **Media Asset** whose duration length will be returned. |
| {% endtab %}      |             |                                                                               |
| {% endtabs %}     |             |                                                                               |

## Outputs

The **Attributes** decide whether `Seconds` or `Frames` appears as output.

{% tabs %}
{% tab title="Seconds" %}

| Output             | Type      | Description                                                                                                                            |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Seconds`          | **Float** | The duration in seconds.                                                                                                               |
| {% endtab %}       |           |                                                                                                                                        |

{% tab title="Frames" %}

| Output             | Type      | Description                                                                                                                            |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Frames`           | **Int**   | The duration in frames.                                                                                                                |
| {% endtab %}       |           |                                                                                                                                        |
| {% endtabs %}      |           |                                                                                                                                        |

## See Also

* [**Media**](/incari-studio/2024.1/toolbox/incari/media.md)
* [**Video**](/incari-studio/2024.1/objects-and-types/scene-objects/video.md)
* [**Audio**](/incari-studio/2024.1/objects-and-types/scene-objects/audio.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.incari.com/incari-studio/2024.1/toolbox/incari/media/getmedialength.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
