scale filter
해상도 변경은 -vf scale=W:H 통해. Width와 height는 literal pixel (1280:720), special -1 (aspect ratio 보존, 2로 나눠떨어지는 짝수), 또는 expression (iw/2:ih/2) 받아.
Aspect-ratio 안전 scaling
두 dimension 모두 hard-code 하면 video가 squish 될 수 있어. 외울 패턴 두 개:
scale=1280:-2— width 1280, height auto + 짝수로 round (H.264/H.265 짝수 dimension 요구).scale=-2:720— height 720, width auto.scale=iw/2:ih/2— 절반 사이즈, 정확한 ratio 보존.
Up vs down scaling
Down은 perceptual 단위로 lossless — pixel 버리는 거. Up은 perceptual 단위로 lossy — pixel 만들어내는 거. scale default는 bicubic, downscale엔 OK, 적당한 upscale엔 acceptable. 공격적 upscale (480p → 4K) 은 AI 도구 (Topaz, esrgan) 또는 Linux의 realesrgan_ncnn filter 고려.