Start
//

Step 2: Trim Your Audio

What you'll learn: How to use both relative trimming (trimstart/trimend) and absolute trimming (sourcein/sourceout).

Relative trimming removes time from the start and end. The source audio is 10 seconds long. By setting trimstart="2s" and trimend="2s", we remove 2 seconds from each end, resulting in a 6-second clip.

Live

Trimmed: 2s removed from each end

Absolute trimming uses exact timestamps. By setting sourcein="2s" and sourceout="4s", we show exactly the 2-second window from 2s to 4s in the source.

Live

Absolute: source 2s–4s only

Try it yourself: Experiment with both approaches. For help choosing which to use, see How To: Choose Between trimstart and sourcein.