How does scaling affect VMAF scores?

For example, if a fast paced 1080p lossless source video is scaled to both 936p, 720p etc etc, without limiting bitrate, i would imagine the higher resolution would be prefered by vmaf. But if we limit bitrate to 6k or 8k for the context of streaming, I would personally prefer 720p over 936p, but how would vmaf scores be affected?
9 Replies
Addie
Addie10mo ago
vmaf will always prefer the native resolution
HunterAP
HunterAP10mo ago
VMAF wants both the original and compressed videos to be the same resolution If your compressed video was upscaled, then you either need to upscale the source video to the new resolution, or downscale the compressed video back to the original resolution and the same goes when the compressed video is a lower resolution - either the compressed video has to be upscaled back to the original resolution, or the original video needs to be downscaled to the new resolution Realistically you would not do any scaling on the original video and just scale the compressed video to match the original one
Addie
Addie10mo ago
depends on the angle you're analyzing from most of my use cases I'm scaling the source video (losslessly) scaling the compressed one just makes it look worse, but also isn't the point of the comparisons for me if you're trying to compare 720/936p to 1080p then yeah you gotta scale up but fuck 936p
Flaeri
Flaeri10mo ago
I believe I got scenes a few years ago where vmaf would prefer 720p over 1080p coming from a 1080p input. Intentionally making it difficult of course with cbr 6mbit with difficult fast paced gameplay. I agreed that the 720p looked better, even when scaled up to 1080p. It's not a hard and fast rule, and vmaf might be lending too much credence to native res, but at least not always 🙂 This was in the time before vmaf-neg. Unsure how that would change things
Addie
Addie10mo ago
their documentation and all of my prior testing definitely indicated when comparing to 4K that native res was king, even when comparing a lossless 1080p vs really compressed 4k
Flaeri
Flaeri10mo ago
I've not dabbeled in 4k, so can't comment. Guess I'll see if I can't find a reproducible scenario to support my claim with some actual data (or fail, and live with the shame)
Flaeri
Flaeri10mo ago
Das all I got:
All:
ffmpeg -i .\losslessnms.mov -c:v libx264 -preset veryfast

1080p:
-b:v 6M -maxrate 6M -bufsize 6M -g 120 -x264-params "no-scenecut=1" -nal-hrd cbr -pix_fmt yuv420p -an nms-1080p-6m.mp4

720p:
-b:v 6M -maxrate 6M -bufsize 6M -g 120 -x264-params "no-scenecut=1" -nal-hrd cbr -pix_fmt yuv420p -vf scale=-2:720 -an nms-720p-6m.mp4

1080p control:
-crf 20 -g 120 -x264-params "no-scenecut=1" -pix_fmt yuv420p -an nms-1080p-crf20-control.mp4
All:
ffmpeg -i .\losslessnms.mov -c:v libx264 -preset veryfast

1080p:
-b:v 6M -maxrate 6M -bufsize 6M -g 120 -x264-params "no-scenecut=1" -nal-hrd cbr -pix_fmt yuv420p -an nms-1080p-6m.mp4

720p:
-b:v 6M -maxrate 6M -bufsize 6M -g 120 -x264-params "no-scenecut=1" -nal-hrd cbr -pix_fmt yuv420p -vf scale=-2:720 -an nms-720p-6m.mp4

1080p control:
-crf 20 -g 120 -x264-params "no-scenecut=1" -pix_fmt yuv420p -an nms-1080p-crf20-control.mp4
No description
HunterAP
HunterAP10mo ago
FFmetrics just uses FFmpeg for VMAF stuff, you can see the process running in Task Manager Looking at the command line, they scale the compressed video to the resolution of the source, regardless of whether that is up or down AKA 1080p source vs 720p compressed copy -> compressed copy is upscaled to 1080p 720p source vs 1080p compressed copy -> compressed copy is scaled down to 720p I used the same commands as above and did the same with a scaled down video as the "source" and the graphs look like what Flaeri posted
Flaeri
Flaeri10mo ago
its a lossless copy yuv444, utvideo oh, I missunderstood. early morning 🤦 yes, when I used to do this by hand in ffmpeg, I manually would vf scale the the raw frames to fit I had this in my old guide:
ffmpeg -i dist.mp4 -i ref.mp4
-filter_complex "[0:v]scale=1920:1080:flags=bicubic[main];[main][1:v]
libvmaf=model_path=C\\:/ffmpeg/model/vmaf_v0.6.1.json:log_path=VMAF_out.txt" -f null -
ffmpeg -i dist.mp4 -i ref.mp4
-filter_complex "[0:v]scale=1920:1080:flags=bicubic[main];[main][1:v]
libvmaf=model_path=C\\:/ffmpeg/model/vmaf_v0.6.1.json:log_path=VMAF_out.txt" -f null -
I beleive they do something similar
Want results from more Discord servers?
Add your server