Guide · By PostBoost team · · Markdown
Short answer: a video in an X post can run from 0.5 seconds to 20 minutes and weigh up to 8 GB. With X Premium or a verified account, the limits rise to 125 minutes and 16 GB. That is what X's developer docs say, and they add that "Post-video caps match the X app" (X best practices). The 2 minutes 20 seconds that many guides still quote is, per the same docs, the limit for a video in a direct message. Export an H.264 MP4 with AAC-LC audio in 16:9 or 1:1, and check the file against every network in the free social media video specs checker.
X video limits at a glance
| Standard account | Premium or verified | |
|---|---|---|
| Post video length | 0.5 s to 20 min | 0.5 s to 125 min |
| Post video file size | 8 GB | 16 GB |
| DM video length | 0.5 s to 140 s (2:20) | 0.5 s to 10 min |
| DM video file size | 512 MB | 1 GB |
| Playback resolution | 720p | 1080p when you upload 1080p |
| Videos per post | 1 | 1 |
The length and size rows come from X's media upload introduction, which says the limits follow the uploading account's X Premium or verified status, not your developer API plan. The resolution row comes from the best practices page: "Subscribed users can upload a 1080p video and get 1080p playback", while "Unsubscribed users can upload a 720p video and get a 720p playback."
Where the 2:20 limit went
Many "how long can a Twitter video be" pages still give 2 minutes 20 seconds as the limit for posts. X's developer docs now list 140 seconds only for videos in direct messages, and 20 minutes for videos in posts. The best practices page puts it plainly: "DM video remains 140 seconds default / 10 minutes Premium."
X also runs a help center page on longer videos for Premium subscribers. We could not load it to check its figures, so the numbers in this article come from the developer docs only. If X refuses a video that these limits say should fit, try the same file in the X app to see X's own message.
The format X wants
X's best practices page lists recommended settings and hard limits. Recommended:
- Video codec: H.264 High Profile.
- Frame rate: 30 or 60 FPS.
- Resolution: 1280×720 (landscape), 720×1280 (portrait) or 720×720 (square).
- Aspect ratio: 16:9 (landscape or portrait) or 1:1.
- Bit rate: at least 5,000 kbps video and 128 kbps audio.
- Audio: AAC LC.
The hard limits on the same page:
- Frame rate 60 FPS or less.
- Aspect ratio between 1:3 and 3:1, with square pixels (1:1 pixel aspect ratio).
- Pixel format YUV 4:2:0 only.
- Audio AAC Low Complexity, mono or stereo. "High-Efficiency
AACis not supported", and 5.1 sound is refused. - Progressive scan, no open GOP.
The same advanced list gives dimensions "between 32x32 and 1280x1024", which a 720×1280 portrait video from the recommended list would exceed in height. X's docs don't explain the difference. A 1:1 or 16:9 landscape export avoids the question.
GIFs are not videos on X
An animated GIF has its own, much smaller limits: 15 MB, at most 1280×1080 pixels, 350 frames and 300 million pixels in total (width × height × frames) (X best practices). X warns that "A GIF may fail during Post creation even if it is within the file size limit." For a screen recording longer than a few seconds, upload an MP4 instead: a video has no 350-frame cap and an 8 GB limit instead of 15 MB. The X image size guide covers GIFs and photos in more detail.
Schedule an X video in PostBoost
- In PostBoost, create a post and select your X account.
- Add the video from your device or the media library. Upload an H.264 MP4. PostBoost also repackages an H.264 MOV or MKV as MP4 without re-encoding. A MOV in another codec, such as an iPhone's HEVC, is kept as it is, so convert it to H.264 MP4 first.
- Write the text. The video doesn't use any of the 280 characters (25,000 for verified accounts), so the X character counter only needs to check the words.
- Pick a time and schedule. The post sits in the calendar until then.
The editor checks the post before it lets you schedule:
- One video, nothing else. An X post carries one video, or one GIF, or up to 4 photos. A video next to photos shows "Combining different media types (videos, photos, GIFs) is not allowed."
- 20 minutes, for every account. A longer video shows "The video is longer than 20 minutes." PostBoost applies this limit to Premium accounts too, so post a video between 20 and 125 minutes in the X app.
- Length still unknown. If PostBoost hasn't read a video's length yet (for example, while it is still processing), the post isn't blocked; X judges the length when it publishes.
At publish time, PostBoost uploads the video to X in chunks as post media and waits until X has finished processing it. If X's processing fails, the post isn't published and the error appears on the post, so nothing goes out without its video. X's docs also warn that "Upload succeeding does not guarantee the media can be attached to a Post": a video that is too long for the account fails with "This user is not allowed to post a video longer than N minutes."
Schedule X videos with the API
Upload the file with the chunked media upload (anything over 10 MB) and keep its id. Find the X account's id with GET /{workspaceUuid}/accounts, then create the post:
curl -s -X POST "https://postboost.co/app/api/$WORKSPACE_UUID/posts" \
-H "Authorization: Bearer $POSTBOOST_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"accounts": [5],
"schedule": true,
"date": "2026-12-15",
"time": "16:00",
"timezone": "America/New_York",
"versions": [{
"account_id": 0,
"is_original": true,
"content": [
{ "body": "We cut our 40-minute product demo down to the 90 seconds people actually asked about.", "media": [712] }
]
}]
}'
When the request schedules the post, as this one does, the server applies the same rules as the editor (a draft skips them). A video with photos is refused with 422 and nothing is created. The same goes for a video over 20 minutes, once PostBoost has read its length. Send the same body to validatePost to check it without creating anything. createPost lists every field, and the free social media API request builder writes the request for you.
Why an X video fails to upload or post
- Too long for the account. Over 20 minutes on a standard account, over 125 minutes with Premium.
- Wrong audio. HE-AAC or 5.1 surround audio. Re-export with AAC-LC, stereo.
- Wrong video. An HEVC, ProRes or interlaced file, more than 60 frames per second, or a pixel format other than YUV 4:2:0. Re-export as H.264 High Profile, progressive.
- Shape out of range. Narrower than 1:3 or wider than 3:1, such as a very tall strip.
- A GIF over its limits. Over 15 MB, 1280×1080, 350 frames or 300 million pixels in total. Convert it to MP4.
Before you export, run the file's numbers through the social media video specs checker: it marks each network Fits, Check or Does not fit, with the reason. For the other networks, see LinkedIn video specs and TikTok video size.
Do this in PostBoost
Free tools for this guide
Free tool
Social media video sizes and lengths cheat sheet
Video ratio, resolution, length, file size and formats for Reels, TikTok, Shorts, YouTube, X, LinkedIn, Pinterest and more, each with its source.
Free tool
X character counter
Free X (Twitter) character counter. Links count as 23, emoji and CJK as 2, as X counts them, live against 280 characters, with the X Premium length.
Free tool
Social media API request builder
Build a create-post request for the PostBoost social media API and copy it as curl, Python, Node.js, PHP, Go, Ruby, Java, C#, Rust or the CLI.
FAQ
How long can a video be on X?
20 minutes for a standard account and 125 minutes for an X Premium or verified account, with a minimum of 0.5 seconds. X's developer docs give these limits for videos in posts and say they match the X app.
What is the maximum video file size on X?
8 GB for a standard account and 16 GB for a Premium or verified account, for a video in a post. Videos sent in a direct message are capped at 512 MB, or 1 GB with Premium.
Is the X video limit still 2 minutes 20 seconds?
Not for posts, according to X's developer docs, which give 20 minutes. 140 seconds (2:20) is the limit they list for a video in a direct message on a standard account; Premium raises it to 10 minutes. Many guides still quote 2:20 for posts.
What is the best video format for X?
An MP4 with H.264 High Profile video and AAC-LC audio, at 30 or 60 frames per second, in 16:9 or 1:1. X recommends 1280×720 for landscape, 720×1280 for portrait and 720×720 for square, and says subscribers who upload 1080p get 1080p playback.
Can I schedule a long video for X Premium in PostBoost?
Up to 20 minutes. PostBoost holds every X account, Premium included, to 20 minutes and shows "The video is longer than 20 minutes." for a longer file. Post anything between 20 and 125 minutes in the X app.
Can an X post have a video and photos?
No. An X post carries one video, or one GIF, or up to 4 photos. PostBoost shows "Combining different media types (videos, photos, GIFs) is not allowed." if you add a video next to photos.
Sources
- X developer docs: Media upload endpoints on the X API v2 (20 minutes and 8 GB, Premium 125 minutes and 16 GB; DM video 140 seconds and 512 MB, Premium 10 minutes and 1 GB; 0.5-second minimum)
- X developer docs: Best practices (Post-video caps match the X app; H.264 High Profile, AAC LC, 30 or 60 FPS, 1:3 to 3:1; GIF 15 MB, 1280×1080, 350 frames, 300 million pixels)
- PostBoost docs: Media uploads (chunked upload for files over 10 MB)
- PostBoost API reference: createPost
- PostBoost API reference: validatePost