How to trim a video to fit twitter / x's 2-minute 20-second limit
- Step 1Decide whether you want the opening 2:20 or a later window — This tool always keeps the first 140 seconds. If the part you want to post is later in the recording, stop here and cut that range first with the lossless-trimmer, then bring the trimmed clip back to the formatter.
- Step 2Drop your clip onto the X formatter — Drag an
.mp4,.mov,.mkv,.webm,.avi,.m4v, or.tsfile in. The file card shows the source length so you can see how much will be cut — anything past 2:20 is going. - Step 3Run it — the 140s cap is automatic — Click Run X Format. There is no length field to set:
-t 140is part of the fixed pass. The only on-page note confirms audio is re-encoded to AAC 128 kbps. - Step 4Let the pass trim, crop, and encode together — FFmpeg.wasm caps the duration at 140 s, center-crops to 16:9, scales
…:720:flags=lanczos, and encodeslibx264 -preset medium -crf 20+aac -b:a 128kwith+faststart— one pass, one MP4. - Step 5Download the length-compliant 1280×720 MP4 — The result card shows input → output bytes and elapsed time. The output is exactly 140 s (or shorter, if the source was already under the cap) at 1280×720.
- Step 6Post to X — Attach the MP4 in the composer. It now clears the 2:20 length gate and is already at X's target shape. For several clips, paid tiers batch them; the free tier does one at a time.
What the 140s cap does to different source lengths
The pass always keeps the first 140 seconds via -t 140. Sources at or under the cap are kept whole. Verified against lib/video/video-processor.ts (runSocialFormat maxSec 140).
| Source length | Kept | Discarded | Note |
|---|---|---|---|
| 0:45 | Full 0:45 | Nothing | Under cap — whole clip kept |
| 2:20 (140s) | Full 2:20 | Nothing | Exactly at cap — whole clip kept |
| 3:00 | First 2:20 | Last 0:40 | Trimmed to first 140s |
| 10:00 | First 2:20 | Last 7:40 | Trimmed to first 140s |
| 1:00:00 | First 2:20 | Rest | Trimmed to first 140s — pre-cut if you want a later part |
This tool vs the lossless trimmer for length cuts
Pick the right tool for the length job. The formatter caps to the opening 2:20 with a re-encode; the lossless trimmer cuts any range with no re-encode.
| Need | Use | Why |
|---|---|---|
| Cap a clip to X's 2:20 and reshape to 16:9 | This formatter | -t 140 + crop + scale + encode in one pass |
| Keep a specific later window (e.g. 5:00–7:20) | lossless-trimmer first | Pick start/end seconds; stream copy, no quality loss |
| Cut with zero re-encode, then post | Trimmer → this formatter | Trim losslessly, then format the result to X spec |
| Split a long recording into several posts | video-splitter | Divide into N equal parts, format each to 2:20 |
Free-vs-paid limits for this tool
From the shared video tier family (lib/tier-limits.ts). One file per job; paid tiers batch sequentially. There is no minutes cap — the constraint is file size, not duration.
| Tier | Max file size | Batch files / job |
|---|---|---|
| Free | 1 GB | 1 |
| Pro | 10 GB | 5 |
| Pro + Media | 100 GB | 50 |
| Developer | 100 GB | Unlimited |
Cookbook
Real length scenarios and exactly what the 140-second cap keeps. The cut is always from the start of the clip.
3-minute clip capped to the opening 2:20
The most common case: a recording just over the limit. The formatter keeps the first 140 seconds and drops the rest. No prompt, no choice of segment.
Source : 180s (3:00), 1920x1080 Pass : -t 140 + crop 16:9 + scale 720 + encode Output : 140s (2:20), 1280x720 MP4 Last 40 seconds are gone.
Under-cap clip kept whole
If the source is already at or under 2:20, nothing is trimmed — the cap is a ceiling, not a fixed duration. The clip still gets cropped, scaled, and re-encoded.
Source : 50s, 1440x1080 (4:3) Pass : -t 140 (no effect) + crop sides + scale Output : 50s, 1280x720 MP4
Want a later window? Trim first, then format
Because this tool only keeps the opening 140s, get your exact window from the lossless trimmer first. That cut is stream-copy (no re-encode), so you lose no quality before the formatter's single encode pass.
Goal: post seconds 300-440 of a webinar. 1) lossless-trimmer: start=300 end=440 -> 140s clip, stream copy (no re-encode) 2) twitter-x-formatter on that clip -> 1280x720 MP4, already <= 2:20
Hour-long recording → one 2:20 highlight
Dropping an hour-long file straight in keeps only the first 2:20 — usually not what you want for a highlight. Cut the highlight first, or split the recording into parts.
Source : 60:00 lecture
Direct : formatter keeps first 2:20 only
Better : lossless-trimmer to the highlight
OR video-splitter into parts, then
format each part to 2:20.Cap rides with the crop on a square source
The 140s cap and the 16:9 center crop apply together in the same pass. A long square clip is both truncated to 2:20 and cropped (top/bottom off) to 16:9 in one encode.
Source : 1080x1080, 4:00
Pass : -t 140 (cut to 2:20)
crop 1080x608 centred -> scale 1280x720
Output : 1280x720 MP4, 140sEdge cases and what actually happens
Source longer than 2:20
Trimmed to 140s-t 140 keeps only the first 2 minutes 20 seconds. Everything after is discarded. This is the tool's intended behaviour for X's length gate, not an error.
You need a segment that isn't the opening
Pre-trim requiredThere is no in/out picker here — the cut is always from 0. Use the lossless-trimmer to select your exact start/end first (stream copy, no quality loss), then format that clip.
Source already under 2:20
Kept wholeThe cap is a ceiling. A 50-second clip stays 50 seconds — only the crop, scale, and re-encode apply. There is no minimum length.
Cut lands mid-sentence at 140s
ExpectedThe hard cut at 140 seconds can fall in the middle of speech or a shot. The formatter has no fade or scene-aware stop. If a clean ending matters, trim to a natural break under 140s with the lossless-trimmer first.
Very long source above your size cap
BlockedLength isn't capped at drop time — but file size is. A multi-hour file may exceed your tier's byte limit (Free 1 GB) and be rejected before processing. Trim or split it down first.
Trimmed output still too large to upload
PossibleEven at 140s, CRF 20 720p high-motion content can approach X's 512 MB upload cap. Length compliance doesn't guarantee size compliance — run a size-targeted compressor (discord-compressor / email-compressor) if the file is too big.
Variable-frame-rate source
SupportedFFmpeg honours -t 140 against the source timeline regardless of VFR, so the kept portion is 140 seconds of real time. The encode normalises frames during the re-encode pass.
Audio runs slightly past the video at the cut
Expected-t 140 caps the output duration; the encoder aligns streams to that. Tiny audio/video tail differences at the cut point are trimmed by the duration cap — there is no manual sync control.
Source dimensions unreadable
ErrorIf the dimensions can't be probed the run fails with "Could not determine video dimensions" — the cap never gets applied because the crop math needs the source size. Re-mux via the video-transcoder first.
Batch of long clips on a paid tier
SequentialEach file is independently capped to its first 2:20 and reshaped. Files run one after another; you download one MP4 per input.
Frequently asked questions
What is X's video length limit?
X caps standard timeline video at 2 minutes 20 seconds (140 seconds). The formatter enforces it with a hard -t 140 on every run, so over-length clips are truncated to the first 140 seconds before they reach the upload step.
Can I choose which part of the video to keep?
Not in this tool — it always keeps the opening 140 seconds. For a specific later window, cut that range first with the lossless-trimmer (start/end seconds, stream-copy, no re-encode), then run the formatter on the result.
Does it trim losslessly?
No. The formatter re-encodes the whole clip (that's how it also crops and rescales). For a length-only cut with zero quality loss, use the lossless-trimmer, which stream-copies at a keyframe boundary.
What if my clip is already under 2:20?
It's kept whole — the cap is a ceiling, not a fixed duration. The crop, scale to 1280×720, and re-encode still apply.
Will the cut be clean, or can it stop mid-word?
It's a hard cut at 140 seconds with no fade or scene awareness, so it can fall mid-sentence. For a tidy ending, trim to a natural break under 140s first with the lossless-trimmer.
How do I split a long recording into several X posts?
Use the video-splitter to divide the recording into equal parts, then run each part through this formatter so each is ≤ 2:20 and at X's spec.
Is there a minimum length?
No. Any length under the cap is accepted as-is; only the upper bound (140s) is enforced.
Does trimming reduce the file size enough to upload?
Not necessarily. Output size depends on content at CRF 20, not on length alone — a 140s high-motion clip can still be large. If you also need to fit a size limit, use a size-targeted compressor like discord-compressor or email-compressor.
What input formats are accepted?
MP4, MOV, MKV, WebM, AVI, M4V, and TS. The output is always MP4.
Is anything uploaded to a server?
No. The trim and encode run in your browser via FFmpeg.wasm. The clip stays on your machine; only an anonymous processed-count is logged for signed-in dashboards.
Can I trim several clips at once?
On paid tiers, yes — Pro 5, Pro + Media 50, Developer unlimited files per job, run sequentially. Free tier does one file at a time. Each is independently capped to 2:20.
Why a 140-second limit and not minutes?
X's spec is 2 minutes 20 seconds, which is exactly 140 seconds — the value baked into the pass. There is no separate minutes setting; the duration constraint is purely this cap (plus your tier's file-size limit).
Privacy first
Every JAD Video tool runs entirely in your browser via WebCodecs and FFmpeg (WebAssembly). Your video files never leave your device — verified by zero outbound network requests during processing.