Trim MKV — Free Online Tool

Trim any MKV file to a precise clip by setting a start and end time — the video, audio, subtitle, and chapter streams are copied directly without re-encoding, so trimming is near-instant and lossless. Ideal for cutting highlights from long Matroska recordings without touching codec quality.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

This tool uses FFmpeg's stream-copy mode (`-c copy`) to trim your MKV file without decoding or re-encoding any stream. FFmpeg seeks to the specified start timestamp, then copies the raw compressed video (H.264, H.265, VP9, etc.), audio (AAC, MP3, Opus, etc.), subtitle, and chapter data directly into a new MKV container that spans only the chosen time range. Because no re-encoding occurs, quality is identical to the source and processing is extremely fast — even for large 1080p or 4K files. The trade-off is that the cut points are aligned to the nearest keyframe (I-frame) in the video stream, so the actual start of the output may land a fraction of a second earlier than requested to avoid a broken frame. For frame-accurate trimming, re-encoding would be required.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. This is the command-line tool that all processing is based on; in the browser, this runs as FFmpeg.wasm compiled to WebAssembly, executing entirely on your local machine without any server upload.
-i input.mkv Specifies the input Matroska file. FFmpeg reads the MKV container's stream index to identify all video, audio, subtitle, and chapter tracks before processing begins.
-ss 00:00:00 Sets the trim start time to the beginning of the file (0 seconds). Placed before `-i`, this uses fast keyframe-based seeking so FFmpeg jumps directly to the nearest I-frame at or before this timestamp rather than decoding from the start. Change this value to the desired clip start point in HH:MM:SS format.
-to 00:00:10 Sets the trim end time to 10 seconds into the file. FFmpeg stops copying streams at this timestamp, resulting in a 10-second MKV clip. This is an absolute timestamp from the start of the original file, not a duration — adjust it to wherever you want the clip to end.
-c copy Instructs FFmpeg to copy all streams (video, audio, subtitles, attachments) directly from the MKV input to the MKV output without re-encoding. This preserves original codec quality, makes the operation nearly instantaneous, and retains all audio tracks and subtitle streams present in the source.
output.mkv Defines the output filename and container format. The `.mkv` extension tells FFmpeg to wrap the copied streams in a Matroska container, which fully supports all the codecs and features (multiple audio tracks, subtitles, chapters) that were present in the source file.

Common Use Cases

  • Extract a specific scene or highlight from a long MKV movie or TV episode rip without degrading the H.264 or H.265 video quality
  • Trim silence or dead air from the beginning or end of an MKV screen recording before sharing it as a tutorial
  • Cut a short clip from a multi-hour MKV concert recording to share on a media server like Jellyfin or Plex
  • Isolate a segment from an MKV file that contains multiple audio tracks or subtitles, preserving all those tracks in the trimmed output
  • Quickly produce a short MKV preview or teaser clip from a longer video project without waiting for a full re-encode
  • Remove spoiler content from a specific time range in an MKV episode before sharing it with someone

Frequently Asked Questions

No — `-c copy` is a stream-copy operation, meaning FFmpeg reads the compressed video, audio, and subtitle data and writes it directly into the new MKV container without decoding or re-encoding anything. The output is bit-for-bit identical to the corresponding portion of the source. Quality loss only occurs when re-encoding is involved, which this tool avoids entirely.
When using `-c copy`, FFmpeg cannot cut mid-GOP (Group of Pictures) because that would produce undecodable video. Instead, it seeks to the nearest preceding keyframe (I-frame) before your requested start time and begins copying from there. This means the output may start a fraction of a second earlier than intended. If you need frame-accurate trimming, you would need to re-encode the video, which this lossless trim tool does not do.
Yes. Because the output format is also MKV and `-c copy` passes all streams through, all audio tracks (e.g., a surround sound AAC track alongside a stereo Opus track), subtitle streams (ASS, SRT, PGS, etc.), and embedded chapter data that fall within the trim window are preserved in the output file. This is one of the key advantages of trimming MKV-to-MKV over formats with more limited container support.
Edit the values after `-ss` and `-to` using the format `HH:MM:SS` or `HH:MM:SS.mmm` for millisecond precision. For example, to trim from 1 minute 30 seconds to 4 minutes 45.5 seconds, use `-ss 00:01:30 -to 00:04:45.500`. Alternatively, you can replace `-to` with `-t` followed by a duration (e.g., `-t 00:03:15`) to specify a clip length rather than an end timestamp.
Yes — since this page displays the exact FFmpeg command, you can copy it and run it locally on your desktop where there is no file size limit. Install FFmpeg for your operating system, substitute your actual filename for `input.mkv`, adjust the `-ss` and `-to` timestamps as needed, and run the command in a terminal. Because `-c copy` is used, even multi-gigabyte 4K MKV files typically trim in seconds.
Placing `-ss` before `-i` (as in this command) uses FFmpeg's fast keyframe-based seek, which jumps directly to near the target timestamp without decoding intervening frames — this is much faster for large files. Placing `-ss` after `-i` forces FFmpeg to decode every frame from the beginning up to the target, which is slower but can be more accurate. For stream-copy trimming of MKV files, pre-input `-ss` is the recommended approach and is what this tool uses.

Technical Notes

MKV-to-MKV trimming is among the cleanest stream-copy operations FFmpeg supports, because both the input and output share the same container format and the Matroska specification is flexible enough to carry virtually any codec combination without compatibility conflicts. All video codecs supported in MKV (H.264/libx264, H.265/libx265, VP9/libvpx-vp9, PNG, MJPEG) and all audio codecs (AAC, MP3/libmp3lame, Opus/libopus, Vorbis/libvorbis, FLAC) pass through untouched. Chapters embedded in the source file are preserved if they fall within the trimmed time range, though FFmpeg may shift chapter timestamps to be relative to the new start of the clip. Subtitle streams — whether text-based (SRT, ASS/SSA) or bitmap-based (PGS, DVDSUB) — are also copied as-is. One known limitation is that when trimming VP9 video with `-c copy`, some players may report a slightly inaccurate duration in the output file's header; the content itself is unaffected. For H.264 and H.265 content, output duration accuracy is generally excellent. The MKV container does not impose constraints on bitrate, resolution, or frame rate, so this tool handles anything from low-bitrate 480p recordings to high-bitrate 4K HDR content without modification.

Related Tools