ffmpeg:video_resize
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ffmpeg:video_resize [2025/01/12 12:28] – peter | ffmpeg:video_resize [2025/01/12 13:32] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ffmpeg - Video resize ====== | ||
- | |||
- | <code bash> | ||
- | -vf scale=width: | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <code bash> | ||
- | -vf scale=1280: | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE:** | ||
- | |||
- | * **-1** for the width or height will keep it in ratio to the other specified dimension. | ||
- | * **-2** will keep it in ratio to the other specified dimension, but, to ensure it is divisible by 2 (a requirement for certain encodings such as yuv420p) the width or height will be adjusted if necessary. | ||
- | |||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Upscaling Video to 1080p ===== | ||
- | |||
- | <code bash> | ||
- | ffmpeg -i input.mp4 -vf scale=1920x1080: | ||
- | |||
- | # Using GPU. | ||
- | ffmpeg -vaapi_device / | ||
- | |||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | * It is more computationally expensive but usually described as very high quality and can be used for up- and downsampling. | ||
- | |||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Upscaling Video to 4K ===== | ||
- | |||
- | <code bash> | ||
- | ffmpeg -i input.mp4 -vf scale=3840x2560: | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== Downscaling Video ===== | ||
- | |||
- | <code bash> | ||
- | ffmpeg -i input.mp4 -vf scale=640x480: | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Downscale or Downsize ===== | ||
- | |||
- | <code bash> | ||
- | ffmpeg -i input.mp4 -vf scale=1920: | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== References ===== | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
ffmpeg/video_resize.1736684887.txt.gz · Last modified: 2025/01/12 12:28 by peter