X (Twitter) Video Compressor & Compliance Checker
Auto-check X's official video requirements and fix only what's failing — minimal re-encode, lossless when possible.
Local processing only — your file never leaves the browserX compliance check
Useful next tools
What this tool does
- Auto-check all 6 X video requirements (duration, size, codec, pix_fmt, audio, fps)
- Highlights violations clearly so you can see what is wrong at a glance
- Fixes only what is failing — already-compliant items are stream-copied
- Back-calculates video bitrate from duration when size exceeds 512MB (0.95 safety factor)
- Outputs H.264 High Profile + yuv420p + AAC LC 128k + faststart
- Duration > 140s is flagged as not auto-fixable, with a clear link to the Trim tool
How to use
- 1
Add your video
Drop a video (up to 500 MB) or pick one from your device.
- 2
Run compliance check
All 6 X requirements are checked at once. Violations show an auto-fix plan.
- 3
Trim first if duration is over
Over 140s cannot be auto-fixed. Use the Trim tool, then come back.
- 4
Make X-ready & download
The tool applies only the necessary fixes and produces an X-ready MP4.
What each setting means
Recommended settings
Common pitfalls
Symptom: "Media file could not be processed" on X
Cause: Even a single failing requirement (pix_fmt, codec, bitrate, audio profile) causes rejection.
Fix: Run the compliance check first to see which item is failing, then auto-fix.
Symptom: Duration shows 141.0s and X rejects it
Cause: Sub-second rounding. X caps at exactly 140.0s.
Fix: Trim to about 139s to leave a safety margin.
Symptom: Output still exceeds 512MB
Cause: Very long input pushed bitrate calc to the floor.
Fix: Lower resolution (720p / 540p) or trim the duration shorter.
Symptom: X Premium accounts have different limits — does this still apply?
Cause: X Premium supports up to 3 hours / 8GB videos.
Fix: This tool targets non-Premium (140s / 512MB). For Premium, use the general compress tool.
Symptom: Colors look off after conversion
Cause: HDR → SDR tone mapping is a separate concern.
Fix: This tool converts pix_fmt but does not tone-map HDR content. Use a dedicated color tool.
Equivalent FFmpeg commands
Reference commands you can run on the desktop FFmpeg CLI.
ffmpeg -i input.mp4 -map 0:v:0? -map 0:a:0? -c:v libx264 -preset veryfast -profile:v high -pix_fmt yuv420p -b:v 4500k -maxrate 4950k -bufsize 9000k -c:a aac -b:a 128k -profile:a aac_low -movflags +faststart output.mp4ffmpeg -i input.mp4 -map 0:v:0? -map 0:a:0? -c:v libx264 -preset veryfast -profile:v high -pix_fmt yuv420p -c:a copy -movflags +faststart output.mp4ffmpeg -i input.mp4 -map 0:v:0? -map 0:a:0? -vf "fps=60" -c:v libx264 -preset veryfast -profile:v high -pix_fmt yuv420p -crf 23 -c:a copy -movflags +faststart output.mp4ffmpeg -i input.mp4 -t 139 -c copy output_trimmed.mp4Browser support & limits
- Max input size: 500MB (browser-only processing)
- Duration > 140s is not auto-fixable (trim first)
- X Premium long-form videos (3 hours / 8GB) are not targeted here
- HDR → SDR tone mapping (color correction) is out of scope
Privacy
This tool runs ffmpeg.wasm directly in your browser. Files never leave your device — everything runs locally. Read the privacy policy →
Frequently asked questions
Where are X's video requirements documented?
In the X (Twitter) Help Center and X API Documentation media upload best practices. This tool implements those requirements.
What about Premium (formerly Blue)?
Premium supports long videos up to 3 hours / 8GB. This tool is optimized for non-Premium (140s / 512MB). For Premium, use the general compress tool.
Why H.264 High Profile specifically?
X officially supports it best. Main and Baseline often pass too, but High is the most stable target.
Is 10-bit / 12-bit pix_fmt really rejected?
Yes. X accepts only 8-bit yuv420p. iPhone HDR (yuv420p10le) is rejected as-is.
Doesn't HE-AAC sometimes work?
It can pass in some environments, but X officially recommends AAC LC. HE-AAC can cause playback issues, so this tool transcodes to LC.
Does capping fps to 60 hurt quality?
The fps filter drops frames temporally. Sports / gameplay clips can look less smooth, but it is required for X.
Is my file uploaded?
No. All processing runs locally in your browser; the file is not sent externally.
Related tools
In depth: context unique to this tool
How X's upload pipeline actually rejects your video
When you tap 'Tweet' with a video attached, X's pipeline runs six parallel checks the moment the file lands on its servers: (1) file size (non-Premium 512 MB, Premium 8 GB), (2) duration (non-Premium 140s, Premium 3h), (3) video codec (must be H.264 High Profile — HEVC, VP9, AV1 are rejected), (4) pixel format (4:2:0 8-bit yuv420p only — 10-bit HDR is rejected), (5) audio codec (AAC LC — HE-AAC, Opus, MP3 are commonly rejected), (6) frame rate (≤ 60 fps).
Any one violation causes the upload to fail, but X's UI returns a generic "Your media file could not be processed" message that gives zero hints about which check failed. The preflight checker here verifies all six locally before you upload, so the "I keep retrying and it keeps failing" loop ends.
Why X only accepts H.264 High Profile + yuv420p
X's video pipeline limits codec/pixel format choices for a specific reason: timeline videos must preview instantly across a vast matrix of OS, browser, and device combinations. HEVC works on Apple devices but breaks on parts of Android and Windows. VP9 is great on Chrome / Android but problematic on Safari. AV1 is efficient but burns CPU on older hardware. The 'reliable across all combinations' lowest common denominator is H.264 High Profile.
The pix_fmt restriction is even tighter: 10-bit HDR (yuv420p10le, yuv422p10le) fails because of color-space mapping and bandwidth concerns. iPhone Pro models record in HDR by default, which is why so many people get rejected uploading directly from their phone. This tool transcodes pix_fmt violations to 8-bit yuv420p via libx264, so HDR iPhone footage uploads cleanly (note: no tone mapping, so colors may look slightly faded — that's a separate problem).
X Premium changes the rules — strategies for non-Premium users
X Premium (formerly Twitter Blue) loosens video limits dramatically: up to 3 hours (10,800 seconds), up to 8 GB, and long-form videos qualify for revenue sharing. This tool is tuned for non-Premium constraints (140s / 512MB). Premium users uploading long-form should use the [general compress tool](/en/tools/compress/) with custom targets instead — more flexible.
Effective video strategies for non-Premium accounts: (1) Focus on 'highlight' / 'short' content that fits in 140s naturally. (2) Host long-form on YouTube / TikTok and use X for link distribution. (3) Use threaded posts to chain multiple 140s videos into a sequence. This tool directly supports strategy (1): videos that pass the compliance check upload first-try, eliminating the wasted-time loop between recording and posting.