Skip to content
anYTrim

Getting started

Clipping in depth

Keyframes, overlapping ranges, clipping straight from a URL, and how to prove nothing was re-encoded.

3 min read

Two sources, one timeline

You can clip from a file on disk or straight from a URL.

Clipping from a URL fetches only the byte ranges the clips need. For three
short clips out of a two-hour video that is a fraction of the download — and
it is the reason to use anYTrim rather than downloading the whole thing and
deleting it afterwards.

The trade-off: a URL clip cannot resume mid-range, and the keyframe snapping
is decided from what has been fetched. For anything fiddly, download first.

Setting in and out points

Drag the handles, or type a timestamp. Both accept 1:23, 1:23.5 and
83.5 and mean the same thing.

Keyboard, when the timeline has focus:

Key Does
← → Move the playhead a second
Shift + ← → Move it a frame
I Set IN at the playhead
O Set OUT at the playhead
Space Play or pause

The preview is the real file

It decodes the actual stream, not a proxy. What you hear and see is what the
clip will contain — including the keyframe snap, which is shown on the
timeline as a marker so you can see where the cut will land before you make
it.

Why the IN point moves

Covered in full in why the clips are lossless.
In short: a bit-identical cut must start on a keyframe, keyframes are one to
two seconds apart, and anYTrim snaps backwards and then tells you where it
landed in the Really starts at column.

Snapping backwards rather than forwards is deliberate. A clip that starts
slightly early contains everything you asked for plus a moment before it. One
that started late would be missing the first word of the sentence.

The snap button

Snap to keyframes rewrites your IN points to the exact keyframe times, so
the timeline shows you precisely what you are getting rather than what you
asked for. Available for local files, where the keyframes can be read
directly.

Several clips at once

Clips can overlap, and the timeline shows them in lanes so an overlap is
visible rather than implied. There is a cap of twenty clips per pass — not a
technical limit, a sanity one.

Lay out generates back-to-back clips of a fixed length. It stays disabled
until the video's length is known: generating clips before that arrives
produced a set that was then silently clamped to nothing, which looked like
the button being broken at random.

If fewer clips fit than you asked for, you are told how many did rather than
quietly given a shorter list.

Proving it

Do not take "lossless" on trust. For a local file:

# Pull the same range twice, two different ways
ffmpeg -ss 60 -i source.mkv -to 90 -c copy -f matroska - | Get-FileHash -Algorithm SHA256

Compare that with the hash of the clip anYTrim produced over the same
keyframe-aligned range. They match.

A simpler check, if that is more convenient: compare the video stream's
bitrate and total size before and after with ffprobe. A re-encode changes
both, always. A stream copy changes neither.

Containers

Clips are written as mkv by default, and that is the right default: mkv
holds Opus, VP9 and AV1 without complaint, and every major platform accepts
it. "mp4 is safer" is folklore.

Choose mp4 when a specific tool demands it — but note that mp4 cannot hold
Opus reliably, so pick an AAC audio track if you need one.

Things that will trip you up

A clip of a live stream. Live streams have no fixed duration until they
end. Download first.

A clip from a fragmented stream. Some sites serve video in fragments with
their own timestamps. The cut still works; the reported start time can be off
by a fragment. Check the preview.

Audio that drifts. Very rare, and it means the source has variable frame
timing. The fix is to re-encode just the audio, which anYTrim will offer
rather than do silently.

Found a mistake, or something unclear? These pages are markdown files in the repository — a pull request is welcome, or report it.

A choice about measurement and adverts. We count page views in our own database — which guides get read, where downloads come from — and we show a few Google adverts on the guides to cover what this costs. Nothing is sold or shared, and nothing is gated behind either answer. Choose them separately.