# How to trim an AVAssetMBS?

**URL:** <https://forum.xojo.com/t/how-to-trim-an-avassetmbs/88231>\
**Category:** macOS\
**Created:** [May 8, 2026, 2:28pm UTC](https://forum.xojo.com/t/how-to-trim-an-avassetmbs/88231 "2026-05-08T14:28:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Sweeney](https://forum.xojo.com/user_avatar/forum.xojo.com/mark_sweeney/32/3332_2.png) [@Mark\_Sweeney](https://forum.xojo.com/u/Mark_Sweeney)\
**Post date:** [May 8, 2026, 2:28pm UTC](https://forum.xojo.com/t/how-to-trim-an-avassetmbs/88231/1 "2026-05-08T14:28:14Z")

</div>

I’m loading audio from a movie, and so I know how to get the AVAssetMBS from the movie.

What I haven’t figured out is how to make a copy of a small section of the AVAssetMBS for creating waveforms from that section, and playing that section of audio.

Can anyone tell me where to look for info on how to do this?

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [May 8, 2026, 6:09pm UTC](https://forum.xojo.com/t/how-to-trim-an-avassetmbs/88231/2 "2026-05-08T18:09:28Z")

</div>

Well, you could of course use [AVAudioPlayerMBS](https://www.monkeybreadsoftware.net/class-avaudioplayermbs.shtml) to play audio (or [AVAudioPlayerNodeMBS](https://www.monkeybreadsoftware.net/class-avaudioplayernodembs.shtml)). There you can load a video file, pick a start position and play. You check with a timer if end time is reached and stop it.

For making an audio file, you could use [AVMutableCompositionMBS](https://www.monkeybreadsoftware.net/class-avmutablecompositionmbs.shtml) to append parts of assets. Then use [AVAssetExportSessionMBS](https://www.monkeybreadsoftware.net/class-avassetexportsessionmbs.shtml) to write it to a file.

Our sample projects may help on this.

---

<div class="post-metadata">

**Author:** ![Louis\_D](https://forum.xojo.com/letter_avatar_proxy/v4/letter/l/cab0a1/32.png) [@Louis\_D](https://forum.xojo.com/u/Louis_D)\
**Post date:** [May 8, 2026, 6:46pm UTC](https://forum.xojo.com/t/how-to-trim-an-avassetmbs/88231/3 "2026-05-08T18:46:54Z")

</div>

Supposing that you don’t want to do the editing right within your app, if you can save the audio as a file, perhaps you can edit and extract the parts that are of interest with a software such as [Audacity](https://www.audacityteam.org/)? Available for Windows, MacOS and Linux, free. I did a project with that tool long ago.
