| | 53 | |
| | 54 | = Upscaling video for higher peak quality = |
| | 55 | |
| | 56 | Due to the encoding ladders that Youtube and other streaming sites utilise to re-encode uploaded videos in different qualities, higher resolution videos receive a higher bitrate. It's possible to use upscaling to exploit this for higher peak viewing quality. |
| | 57 | |
| | 58 | The following will use nearest neighbor scaling to upscale a video by 2x in each direction for 4 times the total resolution and minimal scaling artifacts: |
| | 59 | |
| | 60 | {{{ |
| | 61 | ffmpeg -i input.mkv -vf scale=iw2:ih2:flags=neighbor -c:v libx264 -preset slow -crf 18 output.mkv |
| | 62 | }}} |
| | 63 | |
| | 64 | To upscale by 4x or 8x, use `scale=iw4:ih4:flags=neighbor` and `scale=iw8:ih8:flags=neighbor` respectively. This can be useful for low-resolution material such as VHS captures, DVD video, and gameplay capture of old video games that would otherwise suffer from excessive loss of detail if uploaded in 480p or lower resolution. |