Published on March 16, 2021 (about 3 years ago)

Fast and accurate Clipping for VOD and live streaming

Bonnie PecevichJosh Allmann
By Bonnie and Josh4 min readProduct

Clipping has been our most requested feature and we’re excited to make this feature available. You can use it for both live and on-demand video to generate clips at exactly the time you want and have it be ready almost instantaneously.

Of course clipping isn’t a new concept for video but, generally, up until now, you had to choose whether you wanted the clip to be available immediately OR have the ability to select the exact time to begin and end the clip.

Clips may feel optional, but they can be really useful in some instances.

As straightforward as this feature seems, there are interesting use cases for it. Here are a couple ways our customers are using it:

Trim pre-roll and post-roll

For live event recordings, you can trim the recorded video afterwards to get a cleaner version for replays, regardless of when the encoder started and stopped publishing.

“We live stream our fitness classes ten times per week, and each of those recorded assets contains a few minutes of video that we want to cut from the start of each stream. With Mux’s new clipping feature, we’re able to trim the beginning and immediately publish a polished video while we wait for the fully edited version to be published, about 24 hours later.” - Alex Parsons, CTO at TimeShift Media

Create clips of key moments from your live event...while it’s happening

Attract new viewers to your live event and re-engage anyone that’s dropped off by sharing key moments as soon as they happen. Since clips are available almost instantly, you can be the first to capture and monetize viewers before those moments are available on other outlets.

“The Barstool content team live streams 3 or more times per day, each stream lasting an hour or longer. With our in-house clipping tool, we could only publish clips 45 minutes to an hour after the stream ended. After switching to Mux’s Clipping, we’re now publishing clips in as little as 5 minutes and can do it while the live stream is still active." - Andrew Barba, Head of Engineering at Barstool Sports

This is also where you can get creative and mix ‘n’ match some of the Mux Video features together. For example, you could use clipping with timeline hover previews and create your own visual clipping tool.

LinkWhy clipping is hard

You may already know that video is hard but clipping isn’t easy either. Here’s my colleague Josh to help explain why.

Why just being fast is hard:

It’s relatively quick to make a copy of the video that approximates the intended start and end times. The clip needs to begin at a video keyframe - and the intended start time is unlikely to land at a keyframe. With a fast-and-rough approach to clipping, there will usually be a few seconds of extraneous data at the beginning, as well at the end - up until the keyframe after the end-time. This inaccuracy is undesirable.

Why being fast and accurate is hard:

To avoid the inaccuracy of fast clipping, one could transcode in order to trim out the extraneous material. This would be slow, especially if many renditions need to be processed in advance. Making a rough copy and trimming only the edges is theoretically possible, but introduces quality loss at the edges that may be perceptible. Moreover, stitching together trimmed edges is likely to cause trouble with arbitrary sources, unless those sources are also pre-transcoded - which we also try to avoid for speed and cost reasons.


A better way is to use fast clipping as the basis for accurate clipping. To turn a fast clip into an accurate clip, we need two things: a start-time offset into the fast clip, and a clip duration. Once we have those, the rest is easy thanks to the Mux just-in-time (JIT) system, which does the heavy lifting. Stay tuned for a future post about how we do this. (Thanks, Josh!)

LinkHow to use it

You can create a clip from an existing asset by making a POST request to the /assets endpoint API and defining the input object's clipping parameters.

{ "input": [ { "url": "mux://assets/01itgOBvgjAbES7Inwvu4kEBtsQ44HFL6", "start_time": 10.0, "end_time": 51.10 } ], "playback_policy": [ "public" ] }

The response will include an Asset ID and a Playback ID for your new clip. Check out the Clipping Guide for full details!


Since Clipping produces new video assets, this feature has usage-based pricing. Each newly created clip is considered an on-demand asset and costs include encoding, storage and delivery usage.

Written By

Bonnie Pecevich

Focused on go-to-market strategy and developer marketing. Former Brownie Girl Scout and now just brownie eater.

Josh Allmann

Worked on video conferencing, blockchain, and half a dozen startups in between. Currently improving his skills with crayons.

Leave your wallet where it is

No credit card required to get started.