goberoi/faceit

Causes file access errors on Windows. A fix is provided in the comment.

Opened this issue · 0 comments

When running faceit on Windows, I got random handle and access errors in _extract_frames function.

To fix this, I added the following code:

video_clip.close() 

right after print('[extract-frames] frames already exist, skipping extraction: {}'.format(video_frames_dir))

and also at the very end of the _extract_frames function.

Yes, it's mostly a Windows issue because it is much more sensitive about accessing open files. On Linux, you generally can access the same file from many processes without any issues. Still, it's a good practice to close a file after you're done processing it.