alexheretic / ab-av1

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

VMAF calculation issue with recent FFmpeg git #142

Closed veikk0 closed 4 days ago

veikk0 commented 1 year ago

I'm having an issue with extremely low (~1) VMAF scores when using an FFmpeg built from recent git code. The score is always this low with any CRF, and ab-av1 keeps going lower and lower until the size of max-encoded-percent is reached and it exits.

I've tracked the issue down to the following FFmpeg commit: https://github.com/FFmpeg/FFmpeg/commit/c94e9d03b44d21282418dfb6c84f4f7942d4db03

Calculating VMAF normally using FFmpeg still works fine.

veikk0 commented 1 year ago

Looking through the ab-av1 repository, I can't really find a reason why VMAF calculation is done with pipes instead of a single FFmpeg command.

If the reason is pixel format conversion, then the format filter is the way to go. I believe -pix_fmt is an alias for the format filter anyway and more of a legacy option, but it's more convenient when typing a command for a simple encode.

alexheretic commented 1 year ago

Yep pixel format & vfilter. It may be worth trying to crunch it into a single call. I'd need to regression test such a change.

alexheretic commented 7 months ago

177 changes vmaf to a single ffmpeg call. In my testing this produces identical results to previous code though much simpler and easier to reproduce in a manual ffmpeg call.

veikk0 commented 7 months ago

Nice! I'll do some before-after testing too and report back.

veikk0 commented 7 months ago

WorksForMe