FFmpeg Cookbook
JA

X (Twitter) Video Compressor

Check a video of up to 140 seconds for X on six points, and convert only what needs fixing into an MP4.

Your file is not uploaded
Basic checks for short videos

Checks against 140 seconds, H.264, yuv420p, AAC LC and 40 fps. 40 fps is the limit X Help gives for uploads from a browser, and it also meets the 60 fps limit in X's developer docs. Input is capped at 500 MB, below X's 512 MB limit without Premium, so the tool does not reduce the file size. Premium and upload routes change the rules. Resolution, aspect ratio and account limits are not checked, and acceptance is not guaranteed.

X Help: sharing videos / Official X longer-video conditions
Drag & drop a video, or tap to select
MP4 / MOV / MKV / WebM, up to 500 MB
—
—

X compliance check

—
Duration (≤ 140s)
—
—
File size (≤ 512MB)
—
—
Video codec
—
—
Pixel format
—
—
Audio codec
—
—
Frame rate (≤ 40fps)
—
Processing… 0%

Equivalent FFmpeg command

CLI command for your current settings. Updates live as you change controls.

ffmpeg -hide_banner -i input.mp4 -map "0:v:0?" -map "0:a:0?" -sn -dn -c:v copy -c:a copy -map_metadata -1 -map_metadata:s -1 -map_chapters -1 -movflags +faststart x-ready.mp4

Useful next tools

Popular uses
Auto-check X (Twitter) post complianceHEVC/HDR yuv420p conversionBring videos above 40fps down

How to use

  1. Choose a videoPick a video up to 500MB. Even a smaller file can fail partway on a device with little memory.
  2. Check basic propertiesPress Run compliance check to check the six points. Videos over 140 seconds cannot be converted, so trim them first.
  3. Convert and playPress Make X-ready, then play the saved file and check its color, sound and size.

Recommended settings

HEVC video from an iPhone or similar
Check, then convert to MP4
Keep the original, and check color and sound after converting.
More than 140 seconds
Trim it if you do not have Premium
Premium accounts can post longer videos (X Help).

When it goes wrong

A checked video is rejected

Cause: This tool does not check resolution, aspect ratio, bitrate or account restrictions. X Help lists up to 1920×1200 (1200×1900 portrait), aspect ratios from 1:2.39 to 2.39:1, and up to 25 Mbps for uploads from a web browser.

Fix: Read the error on the upload screen and X Help.

HDR colors look faded

Cause: Converting to 8-bit is separate from tone mapping, which fits HDR colors into SDR.

Fix: Keep the original, and convert it to SDR with software that can tone-map before using it.

Questions

Does Premium also stop at 140 seconds / 512MB?

No. 140 seconds and 512MB are the limits without Premium. According to X Help, Premium allows up to 4 hours and 16GB on the web and iOS (720p for videos over 2 hours) and up to 10 minutes on Android. This tool only handles videos up to 140 seconds.

Do passing checks guarantee acceptance?

No. It checks only six points. Resolution, aspect ratio and the state of your account are not checked.

What about my original and private information?

The original file is not changed, and processing runs in your browser (loading FFmpeg itself needs a network connection). The output has a fixed name and does not copy tags or chapters, but addresses, faces and screens in the picture, and voices, remain.

Does quality change?

Re-encoding the video can lower its quality. Video or audio that is copied does not change. Play the saved file before sharing it.

More detail (settings, limits, FFmpeg commands)

What each setting means

140 seconds / 512MB
X's video limit for accounts without Premium (X Help). This tool does not convert videos longer than 140 seconds. Input is capped at 500 MB, so the tool does not reduce the file size.
H.264 / yuv420p / AAC LC
The output formats. yuv420p is the 8-bit 4:2:0 pixel format. Making a 10-bit HDR video 8-bit does not convert its colors from HDR to SDR (tone mapping).
40fps
X Help lists 40fps as the maximum for uploads from a web browser (X's developer documentation allows 60fps or less). To stay within the browser limit, videos above 40fps have frames dropped evenly to reach 40fps or less (60fps → 30fps, 50fps → 25fps, 120fps → 40fps). Videos whose frame rate cannot be read are converted to 40fps.

Browsers and limits

  • Input up to 500MB. Devices with little memory can fail partway.
  • Videos over 140 seconds cannot be converted. Resolution, aspect ratio and account restrictions are not checked.
  • No HDR tone mapping, and nothing hides faces, screens or voices.

The same job with the FFmpeg command line

Convert video and audio to H.264 / AAC (same settings as this tool)
ffmpeg -i input.mp4 -map 0:v:0? -map 0:a:0? -sn -dn -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -preset veryfast -profile:v high -crf 23 -pix_fmt yuv420p -c:a aac -b:a 128k -profile:a aac_low -map_metadata -1 -map_metadata:s -1 -map_chapters -1 -movflags +faststart output.mp4
The tool copies the video without re-encoding when it is already H.264, yuv420p and 40fps or less, and copies the audio when it is already AAC-LC. The scale filter rounds width and height to even numbers.
Convert to 8-bit (not HDR tone mapping)
ffmpeg -i input.mp4 -map 0:v:0? -map 0:a:0? -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -preset veryfast -profile:v high -crf 23 -pix_fmt yuv420p -c:a copy -movflags +faststart output.mp4
Convert a 60fps video to 30fps
ffmpeg -i input.mp4 -map 0:v:0? -map 0:a:0? -vf "fps=30,scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -preset veryfast -profile:v high -crf 23 -pix_fmt yuv420p -c:a copy -movflags +faststart output.mp4
Every other frame is kept, so motion stays evenly spaced.
Cut to under 140 seconds (no re-encoding)
ffmpeg -i input.mp4 -t 139 -c copy output_trimmed.mp4
Without re-encoding this is fast and keeps the quality. The cut can land slightly off, so it stops at 139 seconds. Check the output duration.

X's limits and what this tool checks

Checked 2026-09-25. According to X Help, accounts without Premium can upload videos up to 140 seconds and 512MB. Premium allows up to 4 hours and 16GB on the web and iOS (720p for videos over 2 hours) and up to 10 minutes on Android (X's official longer-video help, X Help: sharing videos). Uploads from a web browser are listed as up to 1920×1200 (1200×1900 portrait), 40fps and 25 Mbps.

This tool checks only the six points FFmpeg can read. Before posting, check the picture and sound, and whether the content is fine to publish, not just the size.