How to compress video for Twitter / X
Twitter/X accepts up to 512 MB free (140 seconds, 1080p max). X Premium subscribers can post longer/higher-resolution video. The platform re-encodes your upload, so pre-compress only enough to upload within reasonable bandwidth.
Size limit
512 MB
Target output: 500 MB (with safety margin)
Free (140 sec, 1080p): 512 MB
X Premium (up to 4K): 8000 MB
Recommended settings
| Codec | H.264 |
| CRF (quality) | 23 |
| Audio bitrate | 128 Kbps AAC |
| QuickVid mode | Recommended |
ffmpeg one-liner
For terminal-comfortable users, here's the exact command:
ffmpeg -i input.mp4 -c:v libx264 -crf 21 -preset slow -vf scale=-2:1080,fps=30 -c:a aac -b:a 128k -movflags +faststart output.mp4Install ffmpeg via Homebrew: brew install ffmpeg
Tips
- •Twitter aggressively re-encodes — upload at slightly higher quality than you need so the post-compression result still looks good
- •Keep video under 2 min 20 sec for free tier; longer requires X Premium
- •1080p source produces better post-Twitter output than 720p source even though Twitter renders 1080p max
- •Frame rate: 30 or 60 fps both work; 60 fps videos get higher engagement on motion content
Skip the terminal
QuickVid Compress wraps these settings into a one-click "Recommended" mode. Drop your video, pick the mode, save the result. About 30 seconds end-to-end.
Try QuickVidRelated reading
Frequently asked questions
What is the video size limit for Twitter / X?
Twitter / X's default video size limit is 512 MB. Free (140 sec, 1080p): 512 MB; X Premium (up to 4K): 8000 MB. To fit comfortably below the limit, target 500 MB when compressing.
What's the best codec for Twitter / X?
H.264 at CRF 23 produces the best balance of size and quality for Twitter / X. 128 Kbps AAC audio is the right pairing — universal compatibility and small footprint.
How do I compress a video for Twitter / X on Mac?
Drop the file into a Mac compressor like QuickVid Compress (use the "Recommended" mode) or run the ffmpeg one-liner: ffmpeg -i input.mp4 -c:v libx264 -crf 21 -preset slow -vf scale=-2:1080,fps=30 -c:a aac -b:a 128k -movflags +faststart output.mp4. Both produce output that fits Twitter / X's 512 MB limit with no visible quality loss.
Why does Twitter / X reject my video?
Most rejections are file-size related: Twitter / X caps at 512 MB. Other reasons include unsupported codec (use H.264 for maximum compatibility, not HEVC), missing the +faststart flag (which keeps streaming usable on slow connections), or audio in a non-AAC container.
Can I send larger videos via Twitter / X?
Twitter / X offers higher limits on paid tiers — X Premium (up to 4K) accepts 8000 MB. Alternatively, host the video elsewhere (YouTube unlisted, Google Drive, Dropbox) and share a link. For sensitive content where you don't want third-party hosting, compress aggressively to fit the free tier.