Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script stops after completing frame extraction of first video #7

Open
deepshakes opened this issue Feb 27, 2018 · 4 comments
Open

Script stops after completing frame extraction of first video #7

deepshakes opened this issue Feb 27, 2018 · 4 comments

Comments

@deepshakes
Copy link

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
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link

csmit86 commented Nov 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants