MotorCityCobra / face_ripper_9000

Creates 256 cropped, high quality facesets from a batch of mp4 videos end to end
MIT License
30 stars 10 forks source link

Script stops after completing frame extraction of first video #7

Open deepshakes opened 6 years ago

deepshakes commented 6 years ago

This wasn't happening on my Mac, but it's happening on my Windows machine. For some reason, after the first video selected in my mp4 set has finished extracting, the script stops and prints this message:

Traceback (most recent call last):
  File "demo.py", line 146, in <module>
    os.rename(vid, scanned_vids + '/vid' + str(zz) + '_' + random_string(5) + '.mp4')
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '\\Path\\to\\input\\video\\a.mp4' -> '\\Path\\to\\output\\video/b.mp4'
PS \path\to\face\ripper\directory>
PS \path\to\face\ripper\directory>

The forward slash before b.mp4 and the double backwards slashes aren't typos, that's just how it's printing out.

Ianmcmill commented 6 years ago

I get this error on Windows too. I am a total noob in programming but had a basic python introduction. Might this be because of linux/windows paths? I thought os.path takes care of this?

MotorCityCobra commented 6 years ago

Have you tried putting the target image, the demo.py file, the mp4 dir, in different directories?
Especially try putting the target image in its own directory and see if that sorts out any of these path problems.

deepshakes commented 6 years ago

Have you tried putting the target image, the demo.py file, the mp4 dir, in different directories?

Just tried it then, but I'm still getting the same issue.

csmit86 commented 2 years ago

os.rename needs a full path. If you add "/home/USERNAME/" + in front of vid it works. There are more lines where this is necessary.