User Tools

Site Tools


ffmpeg:video_resize

ffmpeg - Video resize

-vf scale=width:height 

Upscaling Video to 1080p

ffmpeg -i input.mp4 -vf scale=1920x1080:flags=lanczos -c:v libx264 -preset slow -crf 21 output_compress_1080p.mp4

NOTE: 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 downsampling.

Upscaling Video to 4K

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

Downscaling Video

ffmpeg -i input.mp4 -vf scale=640x480:flags=lanczos -c:v libx264 -preset slow -crf 21 output_compress_480p.mp4

References

ffmpeg/video_resize.txt · Last modified: 2024/04/29 10:20 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki