master-of-zen/Av1an

Suggestion: Improve handling of failed VMAF probes

clidx opened this issue · 0 comments

clidx commented

aomenc still crashes on specific chunks sometimes. The biggest offender I've noticed is VMAF probing when using a fork. The usual way of moving forward from this is to encode the chunk manually and update done.json.
I have 2 suggestions:

  1. Add a parameter like --probe-fail-quality=XX where a chunk will be encoded with the CRF/CQ of that value, if VMAF probing fails too many times
  2. Skip the chunk, continue encoding and error out before merging the chunks. The user manually encodes the chunk and then --resume merges the chunks. If the first suggestion is implemented, this could be the default behaviour if --probe-fail-quality is not specified, or have another switch controlling whether av1an skips the chunk for the time being. I don't know if av1an already does this but it could also compare the total frames of the chunks/output video vs the source to more or less covers user error.

Suggestion 2 could also be implemented for general chunk encoding fails, not just for probe fails.

I also noticed that av1an doesn't update "per_shot_target_quality_cq" in chunks.json. The CRF/CQ target for each chunk is added to the log file but this isn't persistent across different instances of av1an with --resume. It would be useful if chunks.json was updated with the CRF/CQ as well which would help the user manually encode failed chunks where the actual encode of the chunk fails.