FFmpeg Cookbook
JA

Video Diagnostics Tool

Read a video’s size, duration, resolution and estimated bitrate in your browser, then compare them with reference sizes and the 9:16 shape. It does not test whether an upload will be accepted or the video will play.

Diagnose a video file

MP4, MOV, WebM, and more. Analysis runs locally in your browser.

Popular uses
Pre-upload size checksConsider whether to compressCompare reference sizes and aspect ratios

How to use

  1. Choose a videoDrop MP4, MOV, WebM, or another browser-readable video. The file stays on your device.
  2. Read the diagnosisCheck the figures and compare them with the limit in the destination's official help.
  3. Pick the next toolMove to compression, trimming, SNS resizing, or a dedicated Gmail/WhatsApp/Discord compressor based on the result.

Recommended settings

Unsure whether to compress
Run Diagnose first
Avoid unnecessary re-encodes when the file already fits.
Discord / Gmail / WhatsApp upload fails
Check whether the error is about size, or about the connection or permissions
Compression only fixes size problems. Set a target size when it is the size.
Preparing a vertical social clip
If the 9:16 check says Check, open SNS Resizer
Size alone does not prevent cropping or letterboxing problems.

When it goes wrong

Codec name is missing

Cause: The browser’s video player does not expose codec details.

Fix: To see the codecs, use Analyze video in the Mobile Video Playback Fixer, or desktop ffprobe.

Estimated bitrate differs from ffprobe

Cause: This tool estimates from total file size, so audio, subtitles, and metadata are included.

Fix: Use it as a planning value, then check the final size after compressing.

Small file still crops badly on social apps

Cause: Aspect ratio and framing are separate from file size.

Fix: Use SNS Resizer to make a clean 9:16, 1:1, or 16:9 export.

Questions

Is my file uploaded?

No. The browser’s video player reads the file on your device; nothing is sent to a server.

Where do the Discord reference sizes come from?

Discord’s File Attachments FAQ (updated August 2026) gives 20 MB without Nitro, 50 MB with Nitro Basic and up to 500 MB with Nitro. Some users are part of a test and can upload larger files.

Is Gmail 25 MB per file?

No, it is the total. Personal Gmail allows 25 MB of attachments in all; above that, Gmail switches to a Google Drive link.

Can this tool compress the video directly?

No. It only reads the size and other details. To compress, follow a link in the result to a compressor. A file over a reference value does not need compressing if it is within your destination’s limit.

Does it work on phones?

Yes. It only reads file details and does not run FFmpeg, so it is lighter than the compressors.

More detail (settings, limits, FFmpeg commands)

What each setting means

Estimated bitrate
The average over the whole file, from its size and duration. It cannot tell video from audio.
Size checks
Checks whether the current size is at or below each destination value. All of them are limits from the official help pages: Discord 20 MB without Nitro, 50 MB Nitro Basic and 500 MB Nitro; Gmail 25 MB of attachments in total; WhatsApp 64 MB for a video (the slow-connection limit; 100 MB on a fast one).
Recommended bitrate
Target size × 0.92, divided by the duration, minus the audio (96 kbps up to 10 minutes, 64 kbps beyond). Below 80 kbps the tool shows "Insufficient or invalid budget". Above the cap for the output size (7500 kbps up to 720p, 12000 up to 1080p, and so on; YouTube’s recommended upload bitrates) it shows the cap, marked "(cap)".
9:16 check
Width ÷ height between 0.52 and 0.62 counts as vertical video (9:16 is 0.5625).

Browsers and limits

  • Uses only what the browser can read (size, duration, resolution)
  • Does not inspect codec details, the number of audio tracks, or subtitles
  • The bitrates are planning estimates, not a promise of the final size

The same job with the FFmpeg command line

Formula (not calculated when the budget is too small or the duration is unknown)
video_kbps = min(floor(target_MB * 0.92 * 8000 / duration_seconds - audio_kbps), cap_for_output_size)
1000 kbps example (size depends on duration)
ffmpeg -i input.mp4 -c:v libx264 -preset medium -pix_fmt yuv420p -b:v 1000k -maxrate 1000k -bufsize 2000k -c:a aac -b:a 96k -movflags +faststart output.mp4
Center crop to a portrait frame (check what is removed)
ffmpeg -i input.mp4 -vf "scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,setsar=1" -c:v libx264 -crf 23 -pix_fmt yuv420p -c:a aac output.mp4