To compress a product demo video so the UI text stays sharp, keep the resolution the UI was drawn at, drop to 30 fps if the source is 60, and encode with ffmpeg using CRF rather than a fixed bitrate, with the animation tune for clean interface footage. Then compare frames from the text-heavy parts with the original at full size.

UI footage has big flat areas, thin lines and small text, and a blurry label stands out fast.

Contents

  • Why does UI text go blurry after compression?
  • What should you check before you encode?
  • Which ffmpeg settings keep text sharp?
  • How do you check that the text survived?
  • When should you use H.265 or AV1 instead?
  • Key takeaways
  • FAQ

Why does UI text go blurry after compression?

Video compression throws away fine detail the eye is less likely to miss in a moving filmed scene. A screen recording is made of edges: letters, icons, 1 pixel borders. Those get smoothed when the encoder runs short of bits.

Scaling makes it worse. Record a 4K screen and export at 1080p, and every letter is resampled before encoding starts. Resize twice and small text turns to mush.

Color is a third cause. H.264 normally stores color at half resolution (4:2:0), which can leave colored fringes around colored text.

What should you check before you encode?

Run ffprobe on the source to see its resolution, frame rate and pixel format, then decide three things.

Question What to do Why
Is the source bigger than where it will play? Downscale once, with a good scaler, only if needed Each resize softens text
Is it 60 fps? Drop to 30 fps for UI walkthroughs UI rarely needs 60 fps, and the bits can go to detail instead
Are odd sizes involved? Keep width and height even H.264 in 4:2:0 needs even dimensions

If you do resize, use the Lanczos scaler and scale to an even size:

ffmpeg -i demo.mp4 -vf "scale=1920:-2:flags=lanczos,fps=30" -c:a copy resized.mp4 

Better still, capture or render at the target size so there is no resize.

Which ffmpeg settings keep text sharp?

Use constant rate factor (CRF) instead of a fixed bitrate. You pick a quality level and the encoder spends as many bits as it needs to reach it, so still screens cost less.

ffmpeg -i demo.mp4 \ -c:v libx264 -preset slow -crf 18 -tune animation \ -pix_fmt yuv420p -movflags +faststart \ -c:a aac -b:a 128k demo-web.mp4 

What each part does:

  • -crf 18 is high quality. Lower means better quality and bigger files. Try 18, 20, then 22, and stop where the text starts to soften.
  • -preset slow lets the encoder save more bits at the same quality. Slower is fine for a file you export once.
  • -tune animation tells x264 the footage is flat and drawn, not filmed, which helps edges. Compare it with the default on your own video.
  • -pix_fmt yuv420p plays everywhere. For colored fringes, try yuv444p, but test playback: some browsers and devices won't play 4:4:4 H.264.
  • -movflags +faststart moves the index to the front of the file so it can start playing before it fully downloads.

If the video will be embedded on a page, start behavior matters as much as size. Our guide to product demo video resolution and format covers that side.

How do you check that the text survived?

Compare frames at full size, not thumbnails.

Pull the same moment from both files:

ffmpeg -ss 00:00:12 -i demo.mp4 -frames:v 1 before.png ffmpeg -ss 00:00:12 -i demo-web.mp4 -frames:v 1 after.png 

Pick moments with small text, like a table or a form. Open both at 100% zoom and look at thin letter strokes and 1 pixel borders.

For a number to track across tries, ffmpeg can compute SSIM, a similarity score between two videos where 1 means identical:

ffmpeg -i demo-web.mp4 -i demo.mp4 -lavfi ssim -f null - 

SSIM averages the whole frame, so one blurry label can hide in a good score. Treat it as a hint.

If you embed the result, also check that it doesn't slow the page, as covered in embedding a product video without hurting Core Web Vitals.

When should you use H.265 or AV1 instead?

When you control where the video plays and have tested it there. Both can match H.264 quality in a smaller file, but support varies, and H.264 is still the safest default.

A quick AV1 try with SVT-AV1:

ffmpeg -i demo.mp4 -c:v libsvtav1 -preset 6 -crf 30 \ -pix_fmt yuv420p demo-av1.mp4 

CRF scales differ between encoders, so don't compare an x264 CRF of 18 with an SVT-AV1 CRF of 30. Compare the frames.

I build DemoVexa, which turns a local codebase into narrated product demo videos, and a demo of crisp product screens loses its point if the export blurs them. See how product demo videos are made from code.

Key takeaways

  • UI text is the first thing compression damages, so check it at full size.
  • 30 fps is usually enough for a UI walkthrough.
  • Use CRF with a slow preset, and try -tune animation for interface footage.
  • Compare frames from text-heavy moments, and use SSIM only as a hint.
  • Keep H.264 for reach; try AV1 or H.265 only where you've tested playback.

FAQ

What CRF should I use for a screen recording?

Start at 18 and move up in steps of 2 until the text starts to soften. The right value depends on the source, so check frames rather than copying a number.

Should I record at 60 fps for a product demo?

Only for fast motion you want smooth. For most UI walkthroughs 30 fps is enough.

Why is colored text blurry but black text fine?

Often because of 4:2:0 color subsampling, which stores color at lower resolution. Try a 4:4:4 export and test whether your target players can play it.

Does YouTube re-encode my upload?

Yes. Upload the best quality master you have, not an already compressed copy.

I'm Baltej Singh, founder of DemoVexa, a desktop app and CLI that turns a local codebase into narrated product demo videos. I write from Delaware, USA.