Table of Contents

ffmpeg - Video - Resize - Convert to 1080p (1920x1080)

ffmpeg -i input.mp4 -vf "scale=1920:1080" -c:v libx264 -crf 23 -c:a copy output.mp4

For enhanced quality

ffmpeg -i input.mp4 -vf "scale=1920:1080:flags=lanczos" -c:v libx264 -crf 23 -c:a copy output.mp4

NOTE: This uses the Lanczos scaling algorithm, which can provide better results for upscaling.

Lanczos resampling involves a sinc filter as well.

  • It is more computationally expensive but usually described as very high quality and can be used for up- and down-sampling.

Using GPU

ffmpeg -vaapi_device /dev/dri/renderD128 -i "input.mkv" -vf 'hwupload,scale_vaapi=w=1920:h=1080:format=nv12' -map 0:v -metadata:s:v:0 language=eng -c:v hevc_vaapi -map 0:a -metadata:s:a:0 language=eng -map 0:s? -metadata:s:s:0 language=eng -rc_mode CQP -global_quality 25 -c:a copy -c:s copy -profile:v main -v verbose output.mkv