Categories: Development

Upscale 1080p video to 4k with FFmpeg

How to easily upscale a 1080p video to 4k resolution using FFmpeg and a one-line command.

The speed of the video upscale will depend on the video length, bitrate, your CPU and what settings you use for the upscale process.

The FFmpeg command

Using a slow preset will give good compression and a CRF of 19 will keep most of the original video quality.

Lanczos is a common scale algorithm to use, avoiding a blocky looking video after the upscale.

ffmpeg -i input.mp4 -vf scale=3840x2560:flags=lanczos -c:v libx264 -preset slow -crf 19 output.mp4

Faster?

To achieve a faster upscale use a fast preset like veryfast or superfast however these will give a poorer compression but will complete the upscaling faster

ffmpeg -i input.mp4 -vf scale=3840x2560:flags=lanczos -c:v libx264 -preset veryfast -crf 25 output.mp4

Using a CRF of 25 will also lower the output quality slightly (less bitrate = less size).

You will have to find the perfect preset for how much time you want to spend upscaling and the output quality.

This is all in line with video encoding concepts, slower encoding means more quality is kept and the compression is superior. You cannot simply speed up the process or take shortcuts.

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

2 years ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

2 years ago

Early September spring shots

Some early September spring shots from a bushwalk, It is still too early for wildflowers.

3 years ago

Cloning an NVMe to SK Hynix Platinum P41 NVMe

I recently needed to clone over a smaller NVMe to a 2TB SK Hynix Platinum…

3 years ago

Using Laravel’s deleteDirectory to delete folders and their contents

If you ever needed a simple solution in Laravel to delete an entire directory and…

3 years ago

How to allow only 1 user to register in a Laravel application

How to enforce only one user to register or be registered in a Laravel web…

3 years ago