# RHow to upscale low-res videos to HD with ffmpeg

> Source: <https://www.dedoimedo.com/computers/ffmpeg-hd-upscale-guide.html>
> Published: 2026-08-14 12:00:00+00:00

Updated: August 14, 2026

Here's something you probably never considered doing. Or if you have, you were told, ah, don't bother. After all, old content is meant to be old, and if it looks blurry or pixelated, well, that's life. Or someone could say, grab an expensive machine and let AI fix it for you. Hm. How about a midway compromise? If you have some spare time and spare CPU cycles, you might want to try bringing some extra pixels to your crummy low-res videos. The tool of the trade? The wonderful ffmpeg, to which I've dedicated quite a few tutorials, both directly and indirectly, because pretty much anything media has ffmpeg somewhere under the hood.

I showed you some
[basic usage tips](ffmpeg-guide.html), and we also used the program to
[create HD GIFs](ffmpeg-convert-hd-video-gif.html) for valuable meme sharing. Armed with
this fine knowledge, we can now attempt the impossible. Figure out if there are reasonable methods by
which old, low-res (or SD) videos can be prettified to HD quality without too much hassle or hard
work. I'm going to show you how to do this with ffmpeg, in Linux. The usage applies regardless. Let us
commence then.

## First, a big big BIG disclaimer

The laws of thermodynamics would like a word. By and large, upscaling is magic. When you upscale, well, anything, you generate new information. You create things that did not exist. Think say an image that is just 1x1 pixels. Now, say you make it bigger, 2x2 pixels. You effectively invented three pixels. What sort of data will go into those new pixels?

This is what happens when you take an image or a video (a series of images), and you increase their size from say 640x480 px to something like 1920x1080 px. The output has a much larger surface area, and you need to populate the new pixels in some meaningful way. To that end, you can use one of many image manipulation algorithms, which try to interpolate and extrapolate data in an accurate manner, so that your new output looks true to the origin. Add motion algorithms, blurring, sharpening, color correction, and then some, and you might even get a larger version that looks just about as good as the small original source. Still, it's magic.

What am I trying to say here? Well, several things:

- Be aware that going from say SD to HD might not yield any meaningful improvement in picture quality. Quite the opposite, you may end with yet more artifacts and extra blurring. Every image manipulation leads to some data loss along the way.
- Various image and video correction algorithms can try to guess what's missing, but they might not get it right, leading to weird or distorted shapes and colors. The result will depend on how much noise there is in the original file, and what sort of change you're trying to make. The video stream bitrate will dictate how much useful information there is to work with and process. Your choice of the conversion formats will also affect the product.
- If you intend to watch SD content on a smart TV, most of these devices have embedded video sharpening and upscaling algorithms in their firmware, and they usually do a pretty good job on the fly, as you watch content. By and large, for the most part, you won't get better results doing your own manipulation.
- If you intend to watch SD content in a media player that has no video correction tools, then you might gain some small benefits from a manual change using ffmpeg. All the other caveats still apply.

Now, let's get into it ...

## Preparatory work and info

Before you convert your files, you should be aware what you work with. You can use the ffprobe command, part of the ffmpeg bundle, to inspect the source, and see what video and audio codecs are used, the stream bitrates, and other useful information. E.g.:

Duration: 02:36:35.88, start: 0.000000, bitrate: 1010 kb/s

Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 576x304 [SAR 1:1 DAR 36:19], 862 kb/s,
23.98 fps, 23.98 tbr, 23.98 tbn

Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 135 kb/s

Please note the original video and audio bitrates, the image format ratio, and the FPS. We will need these for the conversion.

## Conversion command, upscaling + padding

I will start by showing you an example command, explain what it does, and then we will create a generic version thereof.

ffmpeg -i Source.avi -vf scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1,setsar=1 -r 23.98 Destination.mp4

### What do we have here?

Here's the breakdown of the selected options:

- We are rescaling an AVI file to MP4 with the resolution of 1280x720px.
- I have not specified any use of codecs, so ffmpeg will handle these automatically.
- The transcoding can lead to some changes in the aspect ratio to match the selected destination.
- I am adding black bar pads around the video to fill in the 1280x720px frame. Due to the difference in the source and destination ratios, which was 36:19 in the original (roughly 1.89) and 16:9 (roughly 1.78) in the destination, we may have new black bars around the actual video to compensate for the change.
- I set the FPS (rate) to match the source. Otherwise, there may be duplicate or dropped frames, and the playback speed may change.

## Aspect ratio tweaks

If you want to make things prettier, you can match the aspect in your destination. For instance, in the example above, 576x304p translates to 1.89 ratio (more or less), so you could specify 1365x720p as your resolution for the destination file. This will get rid of the new padding bands, and make the upscaled video look more like the original.

ffmpeg -i Source.avi -vf scale=1365:720:force_original_aspect_ratio=decrease,pad=1365:720:-1:-1,setsar=1 -r 23.98 Destination.mp4

## Generic command

Now, what you can do is as follows - please note that I broke the output over several lines for clarity:

ffmpeg -i [SOURCE] \

-vf scale=[x]:[y]:force_original_aspect_ratio=decrease,pad=[x]:[y]:-1:-1,setsar=1 \

-r [original fps] [DESTINATION]

## Video tweaks - codecs and filters

Now, here's some more black magic, and you can really go wild here. For example, you may want to add some motion fixing and an unsharp mask, which could potentially make the upscaled videos look slightly less blurry. But this will only work if the source quality and bitrates are sufficient for the algorithms to figure out what to do. For the most part, you won't see major benefits, nor will you do better than most television sets.

To make the best of it, please take a look at the Ffmpeg
[codecs](https://ffmpeg.org/ffmpeg-codecs.html) and
[filters](https://ffmpeg.org/ffmpeg-filters.html) documentation. The two options that make
most sense is to improve motion compensation and sharpen the video output (unsharpen mask). The latter
is not that different from what I showed you in my manual image upscaling attempt
[with GIMP](image-upscale-manual.html). The same basic logic applies.

For instance, for video motion, you could try one of the following:

- bidir_refine integer (encoding,video) - Refine the two motion vectors used in bidirectional macroblocks.
- keyint_min integer (encoding,video) - Set minimum interval between IDR-frames.
- refs integer (encoding,video) - Set reference frames to consider for motion compensation.
- trellis integer (encoding,audio,video) - Set rate-distortion optimal quantization.

And then, also use the prediction mode for motion vectors:

- none (none) - Disable MV prediction.
- spatial (spatial) - Enable spatial predicting.
- temporal (temporal) - Enable temporal predicting.
- auto (auto) - Automatically decided.

We can then also add the unsharpen mask, setting the brush size, blur/sharpen effect for luma, chroma and alpha. This allows you to play not only with the strength of the effect, but also affect the color, luminosity and transparency channels. From the documentation:

...

Sharpen or blur the input video.

It accepts the following parameters:

luma_msize_x, lx - Set the luma matrix horizontal size. It must be an odd integer between 3 and
23. The default value is 5.

luma_msize_y, ly - Set the luma matrix vertical size. It must be an odd integer between 3
and 23. The default value is 5.

luma_amount, la - Set the luma effect strength. It must be a floating point number,
reasonable values lay between -1.5 and 1.5.

Negative values will blur the input video, while positive values will sharpen it, a value of zero
will disable the effect.

Default value is 1.0.

...

A possible command would then look like something like:

ffmpeg -i Source.avi -trellis 2 -direct-pred spatial -vf
scale=1365:720:force_original_aspect_ratio=decrease,pad=1365:720:-1:-1,setsar=1, \

unsharp=3:3:1.:5:5:0.0 -r 23.98 Destination.mp4

Or perhaps:

ffmpeg -i Source.avi -trellis 2 -direct-pred auto -vf
scale=1365:720:force_original_aspect_ratio=decrease,pad=1365:720:-1:-1,setsar=1, \

unsharp=5:5:1.:4:4:0.0 -r 23.98 Destination.mp4

Once again, please remember that all video formatting options cannot have any whitespace characters.
In the example above, setsar and unsharp options need to read:
...setstar=1,unsharp=... without any breaks.

## Does it work?

All right, so the simple answer is, yes and no. One, the results 100% depend on the quality of the source. Two, you will need to spend time and effort tweaking and tweaking. Try different resolutions and aspect rations. Try different video formats. Try different motion algorithms and their strength, and use different unsharpen mask matrices. You don't need to spend hours waiting for an entire clip to be edited. You can set the starting point and the duration of the conversion (as I showed you in my ffmpeg guide), so you can do a simple 1-minute edit to see what gives, and if you're happy. For instance:

ffmpeg -i Source.avi -trellis 2 -direct-pred auto -vf
scale=1365:720:force_original_aspect_ratio=decrease,pad=1365:720:-1:-1,setsar=1, \

unsharp=3:3:1.:5:5:0.0 -r 23.98 -ss 0 -t 200 Destination.mp4

The command will process only the first 3 min 20 sec of the video clip ...

For my example clip from earlier, the conversion, with no video and audio codecs specified, resulted in a file that has roughly 2x bitrate, and size going from 576x304p to 1365x720p. Please note that I specified 1365 in my command, but ffprobe reports 1364. C'est la vie.

Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(progressive), 1364x720 [SAR 1:1 DAR 341:180], 1495 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn
(default)

Metadata:

handler_name : VideoHandler

vendor_id : [0][0][0][0]

encoder : Lavc60.31.102 libx264

Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
(default)

Metadata:

handler_name : SoundHandler

vendor_id : [0][0][0][0]

Watching the output on a monitor with a resolution > the specified one (otherwise, you won't ever see any results really), I can say that the upscaling didn't ruin the quality of the output. Similar to what I'd expect to see on a smart TV, actually, more or less. With some extra video tweaks and filters, the results are a tiny bit better still. Not a lot. But then, my source file already had a pretty good good bitrate to begin with! Of course, different codecs, different rules, but still.

Ffmpeg did use a lot of CPU. By and large, you can expect lots of cores to be utilized, and depending on how big the output ought to be, you can expect the utility to run at 2-4x the speed, so a 60-min clip will complete in roughly 15-30 min. Take this into account for big files. You could also try using hardware acceleration, if you have a capable graphics card, and if you have a modern enough version of ffmpeg on your system. For instance:

ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 8 -i Source.avi -c:a copy -c:v h264_nvenc -b:v 5M -ss 0 -t 300 Destination.mp4

...

Stream #0:1: Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 135 kb/s

frame=7193 fps=1370 q=16.0 Lsize=85672kB bitrate=2339.6kbits/s speed=57.1x

video:80376kB audio:5089kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
0.242017%

...

But this in turn may lead to additional problems, as you will need to use different video formats, and there isn't a 1:1 match between CPU and GPU filters. You will gain speed, roughly 15-20x more than the CPU, but my testing shows more problems than value. We may yet talk about this ...

Back to the topic, I also tested the upscaling to full HD. The bitrate was roughly 3.5 Mbps, the output more than 4x as big as the original, but I couldn't tell (or see) any difference between the 720p and 1080p versions. Both seem to yield similar results. This tells you that magic can take you only so far.

Due to bandwidth limitations, I will not be uploading any video samples here. And rather than have you trust me, I would actually suggest you take your own media, submit it to some mild editing as outlined above, and figure out if you like the results, try not to be subjected to too much placebo, and perhaps get some value out of this tutorial. Conclude, now, we must.

## Conclusion

Ffmpeg is a powerful, useful tool. My guide today outlines yet more practical ways by which you can utilize it in your setup. Upscaling videos without the use of expensive by-frame AI models usually won't lead to any amazing results, but it works, and you could slightly, slightly boost the quality of old footage, if you're not being too greedy or expect any 10x miracles. If your source videos are okayish and have decent bitrate, you might end up with somewhat improved HD conversions. Never forget the laws of thermodynamics. And your TV set will usually do a better job, on the fly.

Manual SD-to-HD conversions will mostly make sense if your media player has no video correction abilities whatsoever, and if you want to gently improve the video feed, with tiny color and sharpening fixes here and there. You may also want to transcode the content. Ffmpeg will do the work, and you can even nicely pad the videos. Take note of the aspect ratio and FPS values, as this will help you get the best results. And that would be all. Hopefully, you've learned something useful, and perhaps, this might come handy, too. Take care.

Cheers.
