---
title: How can I change the media duration?
description: Change how long each image or video plays in your invideo AI video, or replace a clip with a longer one.
---
In invideo AI, the AI sets the duration of each media from the length of the footage. You can change it. How you do it depends on how many media are in the segment.

## A segment with more than one media

A segment with two or more media has no gray lines between them. Here you can make each media longer or shorter.

1. Select the pen icon on the media.
2. Uncheck **trim automatically**.
3. Set the duration you want for this media.

<Image src="https://downloads.intercomcdn.com/i/o/fxxlrhi6/1300950309/a8830e46f315df25ce69521513d9/Screenshot+2024-12-17+at+2_12_06+PM.png" alt="The trim automatically option unchecked on a media" />

To check the length of a segment, open **Media properties**.

<Image src="https://downloads.intercomcdn.com/i/o/fxxlrhi6/1300954014/755a143dfba0aee201b70089f506/Screenshot+2024-12-17+at+2_16_21+PM.png" alt="The Media properties option on a media" />

<Image src="https://downloads.intercomcdn.com/i/o/fxxlrhi6/1300951221/69e10bf7187ca8ed8111ed6d2ce0/Screenshot+2024-12-17+at+2_13_41+PM.png" alt="The segment length shown in Media properties" />

## Set the media duration to 0

You can set the duration of an image or video to 0. The AI then keeps the best length for the video and changes the duration of the other media in the same segment.

<Image src="https://downloads.intercomcdn.com/i/o/fxxlrhi6/1302422550/f3f5b534ac5cb6bfc6370265852a/Screenshot+2024-12-18+at+12_58_25+PM.png" alt="A media duration set to 0" />

## A segment with only one media

A segment with only one media has gray lines on each side.

<Image src="https://downloads.intercomcdn.com/i/o/fxxlrhi6/1263138808/df5d4c0be0270bbd540fc5776079/Screenshot+2024-11-23+at+6_07_43+PM.png" alt="Gray lines between segments that each hold one media" />

To make it longer, replace it with a longer stock clip. You can also generate a new image or video with the generative media option. This uses credits.

<Image src="https://downloads.intercomcdn.com/i/o/fxxlrhi6/1263140365/299eb97e62b197f165ba4891b01b/Screenshot+2024-11-23+at+6_59_39+PM.png" alt="The options to replace a media with stock or generative media" />

To learn how generative media uses credits, see <a href="https://invideo.io/help/billing/how-do-credits-work/" target="_blank">how credits work</a>.