FFmpeg Cookbook
JA

LINE Video Compressor

Make a video smaller before sending it on LINE by compressing it to an H.264 / AAC MP4. Everything runs in your browser.

Your file is not uploaded
Drag & drop a video, or tap to select
MP4 / MOV / WebM and more, up to 500 MB
—
—
This compresses to a widely compatible H.264 / AAC MP4. The target size is an estimate worked out from the video's length.
Compressing… 0%

Equivalent FFmpeg command

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

ffmpeg -i input.mp4 -map "0:v:0?" -map "0:a:0?" -vf "scale='if(gte(iw,ih),-2,trunc(min(min(iw,ih),720)/2)*2)':'if(gte(iw,ih),trunc(min(min(iw,ih),720)/2)*2,-2)'" -c:v libx264 -preset veryfast -pix_fmt yuv420p -crf 26 -c:a aac -b:a 128k -movflags +faststart output.mp4

How to use

  1. Drop a videoChoose an MP4, MOV, WebM or similar video. Both the video and the audio are re-encoded.
  2. Pick a presetSmall for the lightest file, Balanced for everyday sharing, High for 1080p quality.
  3. Compress and downloadPress Compress for LINE, play the result, then download the MP4.

When it goes wrong

The file is still bigger than I hoped

Cause: For long videos the video bitrate stops at its 300 kbps minimum, so the output can exceed the target. If the length cannot be read, the tool ignores the target and compresses by quality (CRF 26).

Fix: Use a smaller preset, or trim the video first.

Quality dropped a lot

Cause: A small target on a long video forces a low bitrate.

Fix: Pick a higher preset, or shorten the video so each second gets more bitrate.

Questions

What size limit does LINE have?

LINE's official help does not state a size or length limit for videos sent in chats (checked 2026-09-25). The preset targets (about 25, 50 and 100 MB) are this tool's own estimates.

Will LINE compress my video again?

LINE's official help does not say whether sent videos are compressed again. Before sending, play the video this tool made and check its quality.

Which preset should I use?

If unsure, use the default, Balanced (720p). Use Small to keep the file as light as possible, or High (1080p) when quality matters more than size.

Is my video uploaded?

No. Compression runs in your browser with ffmpeg.wasm, and nothing is sent to a server.

More detail (settings, limits, FFmpeg commands)

What each setting means

Quality preset
Small = 720p, about 25 MB; Balanced = 720p, about 50 MB; High = 1080p, about 100 MB. The short side (the height of a landscape video, the width of a portrait one) is brought down to 720 or 1080. A video whose short side is already smaller is not enlarged; it keeps its size (rounded to an even width and height). The video bitrate is worked out from the length but has a cap, so short videos come out smaller than the target. The cap follows the output size (7500 kbps up to 720p, 12000 up to 1080p; 4000 when the source is 480p or smaller and 1500 at 360p or smaller; YouTube’s recommended upload bitrates), and Small also stops at 3000 kbps.

Browsers and limits

  • The target size is an estimate worked out from the video length. Long videos can exceed it.
  • If the video length cannot be read, the tool ignores the target and compresses by quality (CRF 26).

The same job with the FFmpeg command line

Compress a 60-second video with Balanced
ffmpeg -i in.mp4 -map 0:v:0? -map 0:a:0? -vf "scale='if(gte(iw,ih),-2,trunc(min(min(iw,ih),720)/2)*2)':'if(gte(iw,ih),trunc(min(min(iw,ih),720)/2)*2,-2)'" -c:v libx264 -preset veryfast -pix_fmt yuv420p -b:v 6153k -maxrate 6153k -bufsize 12306k -c:a aac -b:a 128k -movflags +faststart out.mp4
The same settings as this tool's Balanced preset. The video bitrate (6153k) depends on the length; a 30-second video gets the 720p cap of 7500k. The scale filter brings the short side down to 720, so a portrait video becomes 720×1280, for example; a video whose short side is under 720 is not enlarged.