> For the complete documentation index, see [llms.txt](https://docs.gmetri.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gmetri.com/guidelines-compatibility/guidelines/experience-optimizations/video-optimizations.md).

# Video Optimizations

### Keep videos hidden until needed the scene​ <a href="#keep-vides-hidden-until-needed-the-scene" id="keep-vides-hidden-until-needed-the-scene"></a>

A non-hidden video get decoded by CPU/GPU and blocks its bandwidth. Hidden videos don't consume any CPU/GPU. So keep them hidden until needed, and hide them again if not needed anymore.

### Maximum number of videos that can run in parallel​ <a href="#video-number-of-parallel-streams" id="video-number-of-parallel-streams"></a>

<table><thead><tr><th width="197">Platform</th><th width="269.3333333333333" align="center">No of HD videos, tested with (1280x720)</th><th align="center">No of ~4K Videos, tested with (3840x1920)</th></tr></thead><tbody><tr><td>Desktop/Laptop</td><td align="center">4</td><td align="center">1</td></tr><tr><td>Androids Phones</td><td align="center">4</td><td align="center">1</td></tr><tr><td>iOS Phones</td><td align="center">4</td><td align="center">1</td></tr></tbody></table>

Also check [media codec compatibility](/guidelines-compatibility/compatibility/platform-compatibility-matrix.md#media-codec-compatibility).

### Video Resolution and File Size Recommendation​ <a href="#videos" id="videos"></a>

| Device                  | Recommended Max Resolution | Recommended Max File Size |
| ----------------------- | :------------------------: | :-----------------------: |
| Desktop                 |          4096x2048         |            10MB           |
| Flagship mobile devices |          4096x2048         |            10MB           |
| Low-end mobile devices  |          2048x1024         |            5MB            |

{% hint style="danger" %}
Note that the video resolution here is 4096x2048 and **NOT 3840x2160** (true 4k). This is because for 3D processing both width and height are upscaled internally to the nearest power of 2.&#x20;

For 3840x2160, this upscales to 4096x4096, which is too high for current renderers.
{% endhint %}

### Optimize Video File Size <a href="#transparent-pixels-use-the-same-amount-of-memory-as-non-transparent-ones" id="transparent-pixels-use-the-same-amount-of-memory-as-non-transparent-ones"></a>

Before uploading any videos to the GMetri File Manager (by dragging and dropping files onto it), just run them through a compression tool to reduce their sizes drastically.

**We recommend** you use the Open Source tool [Handbrake](https://handbrake.fr/downloads.php/) to do this. Here's how:

{% embed url="<https://www.youtube.com/watch?v=qv2JnZcf7BA>" %}
Compressing a video using Handbrake
{% endembed %}

**Alternatively, you can compress/resize content on the Adobe Suite**

If you are using Adobe Premiere Pro or Adobe After Effects, directly compress and export the video from Adobe Media Encoder.

Here's a tutorial for this:

{% embed url="<https://www.youtube.com/watch?v=4b-jHxjdEWE>" %}
Compressing a Video using Media Encoder
{% endembed %}

You could also use [FFmpeg](https://ffmpeg.org/) for this.

### Video AutoStart Limitations

On Mobile devices a **Click** action is required in the rule that starts a video (as opposed to any other event like a variable reaching a value, or the scene loading). This is because Mobile devices are strict about getting a user interaction before allowing audio to play.

Also check [Audio AutoStart Limitations](/guidelines-compatibility/guidelines/experience-optimizations/audio-optimizations.md#audio-autostart-limitations).

Here's an example where click events are used to play a video.

<figure><img src="https://2186043722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2Fw6ECb4eA97Lf4qsLvP7G%2Fimage.png?alt=media&amp;token=83813aab-9272-48f7-a795-8d7a38b4584e" alt=""><figcaption><p>A rule where click event(s) are used to play a video</p></figcaption></figure>

Note that this restriction doesn't apply on muted videos. If you mute your video, you can play your video with any rule.

You can mute a video like this:

<figure><img src="https://2186043722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2FTlLRJu44wIqkUPfFnbOG%2Fimage.png?alt=media&amp;token=e02a98a8-d7b1-4526-bcc7-11132dc45ba6" alt=""><figcaption><p>Muting a Video</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gmetri.com/guidelines-compatibility/guidelines/experience-optimizations/video-optimizations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
