alexheretic / ab-av1

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

ETA can become excessively high and cause an overflow #146

Closed veikk0 closed 2 months ago

veikk0 commented 1 year ago

I was encoding a file with SVT-AV1's preset 1 when ab-av1 crashed:

⠄ Searching 00:06:00 ###############-------------------------------------------- (sampling crf 23, eta 580176947043y)thread 'main' panicked at 'overflow when adding durations', library/core/src/time.rs:920:31 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

The ETA started climbing and eventually reached the very high number above. I assume this is because preset 1 is very slow, not very well threaded, and though clip I was encoding is only 60 frames long, it has quite a lot of detail. I also had other encodes going at the time.

The input file was a CRF 0 x264 transcode of touchdown_pass_1080p_60f.y4m from the objective-1-fast dataset available from here.

Command to reproduce:

ab-av1 auto-encode -e libsvtav1 --svt tune=0 --keyint 600 --min-vmaf 92.8 --max-crf 63 --pix-format yuv420p --preset 1 --vmaf n_threads=16 --touchdown_pass_1080p_60f.mp4 --output output.mp4

I'm on Linux Mint 21.1 running ab-av1 0.7.7.

alexheretic commented 1 year ago

Thanks for raising this. I haven't managed to reproduce this, but I can see where it may have happened in the upstream progress-bar code.

alexheretic commented 1 year ago

I have managed to reproduce now & raised an issue upstream https://github.com/console-rs/indicatif/issues/561 I'll also try to look into a fix there when I get a moment.

DuckDuckWhale commented 1 year ago

I've also noticed on the newest commit that the ETA rises for a while until it becomes excessively high, then falls back down to a sensible value, and cycles until it's done. There's gotta be enough information to deduce that it shouldn't be a week until a two-hour encode is done.

alexheretic commented 1 year ago

The overflow should be fixed now, the very high eta issues upstream remain, see

alexheretic commented 2 months ago

174 is probably the quickest way to fix ETAs, unless upstream ever get round to improving it. I think we can close this issue now the immediate actions have been taken.