alexheretic / ab-av1

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

ab-av1 sometimes leaves behind empty "ab-av1-*" temp directories #131

Closed veikk0 closed 1 year ago

veikk0 commented 1 year ago

When I run ab-av1 and it completes as intended, sometimes the "ab-av1-*" temporary directory that's created at the beginning of the process in the running directory doesn't get deleted.

I can't reproduce this reliably every time, but it's been happening for a while with the auto-encode command. Currently I'm using 0.7.5, but it's also happened before.

An example of a command that this happened with:

ab-av1 auto-encode -e libx264 --keyint 120 --min-vmaf 81.25 --pix-format yuv420p --preset ultrafast --vmaf n_threads=4 --enc x264-params=scenecut=0 --input test1.mkv

I don't know if the existence of cached information on the input file has any effect on this, but I was able to reproduce this using the above command three times in a row by deleting the ab-av1 directory in .cache between runs.

alexheretic commented 1 year ago

Are there any hidden files or anything in the leftover temp dirs? Additional/unexpected files being put in there somehow could cause it to fail to be removed at the end.

veikk0 commented 1 year ago

No, these directories are completely empty.

DenysFontaine commented 1 year ago

same here ! A lot of empty folder !

alexheretic commented 1 year ago

Looks like the temp dirs could create another nested one inside which could cause race conditions on removal.

132 should address this.