Trim WebM — Free Online Tool
Trim a WebM file to a specific start and end time, preserving the original VP9 video and Opus/Vorbis audio streams without re-encoding. Because WebM uses stream copying during the trim, the output is generated almost instantly with no quality loss.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your WebM file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
This tool uses FFmpeg's stream copy mode (-c copy) to extract a segment of a WebM file by seeking to the specified start timestamp and cutting at the end timestamp. Because both the input and output are WebM containers sharing the same VP9 video codec and Opus audio codec, no re-encoding is required — the raw encoded packets are simply remuxed into a new WebM file. The seek (-ss) and duration (-to) flags instruct FFmpeg where to begin and end the output. One important nuance: because VP9 uses keyframe-based seeking, the actual cut point may be snapped to the nearest preceding keyframe, which can introduce a fraction of a second of imprecision at the trim boundaries. For frame-accurate trimming, re-encoding would be required.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. In the browser-based version of this tool, this runs via FFmpeg.wasm compiled to WebAssembly, executing entirely on your local machine without any server upload. |
-i input.webm
|
Specifies the input WebM file containing the VP9 video and Opus/Vorbis audio streams to be trimmed. FFmpeg reads the WebM container's index (cues) to enable fast seeking to the start point. |
-ss 00:00:00
|
Sets the trim start time — in this case, the very beginning of the file. Change this timestamp to seek into the WebM and begin the output at a different point, e.g. 00:00:30 to start 30 seconds in. Placed after -i, this performs output-side seeking which works correctly with -c copy. |
-to 00:00:10
|
Sets the absolute end timestamp of the output, trimming the WebM to end at 10 seconds. This is not a duration — it is a position in the output timeline. To trim to a different length, change this value, e.g. 00:02:30 to end at 2 minutes and 30 seconds. |
-c copy
|
Copies all streams — VP9 video, Opus audio, subtitle tracks, and any alpha streams — directly from the input WebM to the output WebM without re-encoding. This makes the trim operation near-instant and fully lossless, at the cost of keyframe-boundary precision. |
output.webm
|
The filename of the trimmed output file. The .webm extension tells FFmpeg to write a WebM container, preserving compatibility with HTML5 video playback and all WebM-specific features present in the source file. |
Common Use Cases
- Remove a long intro or outro from a screen recording exported as WebM to create a tighter tutorial clip for embedding in a web page
- Cut a specific highlight moment from a VP9-encoded gameplay capture to share as a short web-native video clip
- Extract a single segment from a long WebM conference recording — such as one speaker's presentation — without degrading the Opus audio track
- Trim a looping WebM animation (with transparency) to isolate just the portion needed for a CSS or HTML5 background loop
- Shorten a WebM video downloaded from a browser-based video platform before re-uploading it to another web service that enforces a duration limit
- Quickly cut dead silence or buffering artifacts from the start of a WebM live-stream recording before archiving it
Frequently Asked Questions
No. This tool uses -c copy, which copies the existing VP9 video and Opus audio packets directly into the new WebM container without decoding or re-encoding them. The visual and audio quality of the output is bit-for-bit identical to the corresponding segment of the original file. The only trade-off is that cut points are snapped to the nearest VP9 keyframe rather than being frame-accurate.
VP9, like most modern video codecs, uses keyframe-based seeking. When stream copying with -c copy, FFmpeg can only cut cleanly on a keyframe boundary, so the actual start of the output may begin slightly before or after the timestamp you specified. If your source WebM has keyframes every 2–5 seconds (common for screen recordings and web video), you may notice a small drift. For frame-exact trimming you would need to remove -c copy and allow FFmpeg to re-encode the VP9 stream, which will take significantly longer.
Yes. Because the tool remuxes streams rather than re-encoding them, transparency (alpha channel encoded in VP9), subtitle tracks, and chapter metadata that exist in the original WebM file are carried through to the output. However, chapter timestamps that fall outside the trimmed range will reference positions that no longer exist in the new file, so you may want to edit or strip chapter metadata manually if precise chapter navigation matters.
Replace the value after -ss with your desired start time and the value after -to with your desired end time. Both accept the HH:MM:SS format (e.g., -ss 00:01:30 -to 00:03:45) or plain seconds (e.g., -ss 90 -to 225). Note that -to specifies an absolute timestamp in the output, not a duration. If you want to specify a duration instead of an end time, replace -to with -t followed by the clip length in seconds.
Yes. On Linux or macOS you can wrap the command in a shell loop: for f in *.webm; do ffmpeg -i "$f" -ss 00:00:05 -to 00:01:00 -c copy "trimmed_$f"; done. On Windows PowerShell you can use a foreach loop iterating over Get-ChildItem results. Each file will be trimmed to the same start/end range. If you need different trim points per file, you would need a script that maps each filename to its own timestamps.
Yes. WebM with VP9 video and Opus audio is natively supported by all major modern browsers including Chrome, Firefox, Edge, and Opera. Trimming the file does not change its container format or codec, so the output remains a fully HTML5-compatible WebM file that can be used directly in a <video> tag without any transcoding or plugin.
Technical Notes
WebM is a strictly browser-oriented subset of the Matroska container, and trimming it with stream copy is one of the few operations that is both lossless and nearly instantaneous. The VP9 codec stores keyframes (intra-frames) at intervals defined at encode time — typically every 2 to 10 seconds for web video, and more frequently for screen recordings. Because -c copy skips decoding entirely, FFmpeg must align cuts to these keyframe boundaries, which is why the -ss flag placed before -i (input-side seeking) is fast but can introduce small timestamp imprecision. Placing -ss after -i instead performs output-side seeking, which is slower but slightly more accurate for stream copy operations. The Opus audio codec used by default in WebM has a very short frame duration (20ms), so audio boundaries are effectively negligible in practice. If the source WebM contains a VP9 transparency (alpha) stream, it is stored as a secondary VP9 bitstream inside the WebM container; -c copy will preserve this correctly. Files containing HDR metadata (BT.2020 color space, PQ or HLG transfer characteristics encoded in the VP9 bitstream) are also preserved intact by stream copy. One known limitation: if the source WebM was encoded with variable keyframe intervals or as a live-streaming WebM (using WebM's live profile with no cues/index), seeking accuracy may degrade further and the output file may lack a proper cues element, affecting seek performance in players.