alexheretic / ab-av1

AV1 re-encoding using ffmpeg, svt-av1 & vmaf.
MIT License
442 stars 29 forks source link

Feature: Keep VMAF per-frame log #168

Open t-nil opened 9 months ago

t-nil commented 9 months ago

FFmpeg libvmaf has log_fmt=…:log_path=… for storing per-frame logs. These could be used - either by ab-av1 or by a savvy user - to get information such as topX-percentiles (and also possibly other stuff such as plotting^1).

Sadly it currently seems impossible to save per-sample logs, as even if the params are set manually via --vmaf, it's impossible to discriminate based upon the current sample. Furthermore, even if a pipe is used like in […] --vmaf log_fmt=json:log_path=/dev/fd/10 10>>./{vid_name}_vmaf.json […] and the resulting combined log is separated manually, that approach still breaks with search-crf and auto-encode because differentiating based on current CRF is also impossible.

So what about, we just store the log with the samples in the temp directory and keep it when --keep is used? That should be simple, I'm pretty sure I'll get around to it.

This could also solve #164