<p>You can do what @stib said. Use the B and N shortcuts to set the beginning and end of the work area to match your footage. Another good shortcut is  Shift and X to cut the timeline to the current work area. </p>

CC BY-SA 4.0
2020-05-24T00:24:40.477Z
2020-05-24T00:24:40.477Z
Ision Industries
<p>There's no built - in function that does it, but there's a script for that. I wrote one called first-n-last, it's available (free, open source) here <a href="https://blob.pureandapplied.com.au/" rel="nofollow noreferrer">https://blob.pureandapplied.com.au/</a></p>

<p>Alternatively, park your playhead at the beginning of the first layer (select that layer and hit <kbd>i</kbd>), then set the start of the work area to that frame by hitting <kbd>b</kbd> then select the last layer and hit go to the last frame (hit <kbd>o</kbd>) and set the end of the work area to that frame by hitting <kbd>n</kbd>. Now right click the work area and choose <strong>trim comp to work area</strong> from the contextual menu. This doesn't work for layers that extend beyond the beginning or end of the comp, but my srcipt does.</p>

CC BY-SA 4.0
2019-07-18T05:42:35.930Z
You have a really nice website! I'll try it out and get back.
watercollider
CC BY-SA 4.0
2019-07-16T22:22:38.370Z
2019-07-17T07:17:44.480Z
2019-07-17T07:17:44.480Z
stib
<p><a href="https://i.sstatic.net/Z3uCE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Z3uCE.png" alt="enter image description here"></a></p>

<p>How do I reduce the length on the Time Ruler in order to make the composition shorter in duration?</p>

<after-effects><time>
How do I change the length of the timeline of the composition to only be as long as my video footage?
watercollider
# How do I change the length of the timeline of the composition to only be as long as my video footage?

(Asked by: username_0 on 2019-07-16)

[![enter image description here](https://i.sstatic.net/Z3uCE.png)](https://i.sstatic.net/Z3uCE.png)

How do I reduce the length on the Time Ruler in order to make the composition shorter in duration?

**Tags:** after-effects, time


---

## 2 answers

### Answer by username_1 on 2020-05-24. Score: 1 | Accepted answer

You can do what @username_2 said. Use the B and N shortcuts to set the beginning and end of the work area to match your footage. Another good shortcut is Shift and X to cut the timeline to the current work area.


---

### Answer by username_2 on 2019-07-16. Score: 1

There's no built - in function that does it, but there's a script for that. I wrote one called first-n-last, it's available (free, open source) here <https://blob.pureandapplied.com.au/>

Alternatively, park your playhead at the beginning of the first layer (select that layer and hit `i`), then set the start of the work area to that frame by hitting `b` then select the last layer and hit go to the last frame (hit `o`) and set the end of the work area to that frame by hitting `n`. Now right click the work area and choose **trim comp to work area** from the contextual menu. This doesn't work for layers that extend beyond the beginning or end of the comp, but my srcipt does.

> **Comments:**
> **username_0**: You have a really nice website! I'll try it out and get back.  

---

