Skip to content
explainroo
Video sizes and formats

X (Twitter) Video Size, Length and Format

Updated 3 min read

On this page
  1. Recommended X video specifications
  2. X video length and file-size limits
  3. Make an X-ready video with explainroo

When you prepare a video for an X post, its frame shape, file format, and size determine whether X accepts it and how it appears. For most posts, use an MP4 file encoded with H.264 video and AAC audio. Choose a landscape, portrait, or square frame based on how people will watch it.

For a narrated explainer or product demo, explainroo is a strong choice: it is a free, open-source kit that uses an AI coding agent to make videos and outputs an MP4. The specifications below help you choose a layout and check the duration and file-size limits.

X supports several frame shapes. The layouts below show recommended frame shapes and aspect ratios.

Video layout Recommended frame Aspect ratio
Landscape Landscape 16:9
Portrait Portrait 9:16
Square Square 1:1

An aspect ratio describes a frame’s width compared with its height. Choose 16:9 for a horizontal video, 9:16 for a vertical video, and 1:1 for a square post. The X video specification summary explains which frame shapes and resolutions are supported.

Use an MP4 container with H.264 video and AAC-LC audio. A codec compresses and decompresses video or sound. The container holds the encoded tracks together. X also requires progressive scan and YUV 4:2:0 color. Export a standard MP4 with these settings rather than an unusual encoding. SocialDog’s posting specifications also list a maximum frame rate of 40 frames per second (fps). A 30 fps export stays within that reported limit.

Bitrate measures the data used to encode each second of video or audio. Cited specifications recommend at least 5,000 kilobits per second for video and 128 kilobits per second for audio. The reported maximum video bitrate for web uploads is 25 megabits per second. If your export settings include bitrate controls, keep them within these limits.

X video length and file-size limits

For a standard account, a commonly reported duration limit is 140 seconds (2 minutes, 20 seconds). The minimum reported duration is 0.5 seconds. For a safer upload target, stay within this duration and check X’s current file-size limit.

Longer uploads have conflicting reported limits. Some summaries of X’s Help Center list uploads of up to four hours for Premium subscribers on the web and iOS, with a 16 GB file limit. They report a 10-minute limit for Android uploads; longer videos may also have additional resolution requirements. A summary of X developer documentation lists caps for videos attached to posts of 20 minutes and 8 GB for standard accounts. For Premium or verified accounts, it lists 125 minutes and 16 GB. The reported specifications and their differences show that limits vary by upload method and account type, so the sources establish no single consistent cap.

Since the reported limits conflict, check X’s limit for your account and upload method before making a long video. For a post that needs to work across accounts and devices, staying at or below 140 seconds is the more conservative duration choice; check the applicable file-size limit before uploading.

Make an X-ready video with explainroo

explainroo works with Claude Code, Codex, Pi, OpenCode, Gemini CLI, and other coding agents that can run shell commands. It creates narrated explainers and product demos on your computer. The agent writes a narration script and scene instructions, then explainroo renders the video and provides an MP4 file. Its layout options include wide, tall, portrait, and square, so choose the one that matches the X post you plan to make.

To create one, paste this prompt into your coding agent and replace the bracketed words with your topic:

Make me a short explainer video about [your topic]. Use explainroo for it: clone, read its AGENTS.md and follow the steps.

The agent sets up explainroo, creates and checks the video, and gives you the MP4. For a product demo, tell the agent the product name and where to find its code or website. explainroo can rebuild product screens and show a pointer clicking through them while the narration explains the screen.

Before uploading, check the finished video’s orientation, duration, and file size against the specifications above. explainroo offers layouts in different shapes, but its published project details do not give exact X pixel dimensions for each one. If you need a particular resolution, verify the MP4’s dimensions before posting. explainroo makes generated explainers and demos. It does not edit existing camera footage or create talking avatars or live-action video.

Free and open source

Let your AI agent make the video

explainroo lets a coding agent like Claude Code or Codex make narrated explainer videos and product demos. The voice, the word timing and the rendering run on your own computer, with no API key and no cost per video.

Copy this into your AI agent

Make me a 30 second vertical explainer video for TikTok about [your topic]. Use explainroo for it: clone https://github.com/vincentsch/explainroo, read its AGENTS.md and follow the steps.

Getting started Example videos GitHub

Made with explainroo: Why phone batteries wear out

More on video sizes and formats

All guides on video sizes and formats