# Get Media Length

## Overview

![The Get Media Length Node when Object and Seconds are selected in the Attributes.](https://1553081948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU990HLHWA30dTfELtDUK%2Fuploads%2Fgit-blob-9ac0b40294dcdcc56082608be5db64ab170b4c3b%2Fgetmedialengthnode20241.png?alt=media)

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**](https://docs.incari.com/incari-studio/overview#scopes): **Scene**, **Function**, **Prefab**.

## Attributes

![The Get Media Length Node Attributes.](https://1553081948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU990HLHWA30dTfELtDUK%2Fuploads%2Fgit-blob-6e4d86597dc9330b882971652781f73767afaf13%2Fgetmedialengthatts.png?alt=media)

| 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**](https://docs.incari.com/incari-studio/toolbox/incari/media)
* [**Video**](https://docs.incari.com/incari-studio/objects-and-types/scene-objects/video)
* [**Audio**](https://docs.incari.com/incari-studio/objects-and-types/scene-objects/audio)
