# getCinematicDuration (Client)

> Returns how long the cinematic lasts.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Cinematics
- **URL**: https://wiki.mymp.gg/en/getCinematicDuration

## Syntax

```lua
int, bool|false getCinematicDuration(cinematic cinematic)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `cinematic` | `cinematic` | The cinematic. |

## Returns

The duration in ms and whether it was fixed by `setCinematicDuration`, or `false` if the element is not a cinematic.

Without a fixed duration, the cinematic lasts up to the last thing in it: a shot, a weather, hour or fade key, a sound, a caption, or the end of a take or of a placed prop.

## Example

```lua
local intro = createCinematic("cinematics/intro.cine")
local length, fixed = getCinematicDuration(intro)
outputDebugString(("Intro: %.1f s%s"):format(length / 1000, fixed and " (fixed)" or ""))
```

## See also

- [setCinematicDuration (Client)](https://wiki.mymp.gg/en/setCinematicDuration.md): Fixes the cinematic's duration. Playback ends when it gets there.
- [getCinematicPosition (Client)](https://wiki.mymp.gg/en/getCinematicPosition.md): Returns which cinematic time the playback is at.
- [setCinematicPosition (Client)](https://wiki.mymp.gg/en/setCinematicPosition.md): Jumps the playback to another time of the cinematic. The clones are kept; each is set back on its sample and in or out of its vehicle as its take has it.
