wuhuikai / FaceSwap

Swap face between two photos.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swap video error

xiaosefengyun opened this issue · comments

Perhaps wrong dlib version or python version.

I have the same error. It is not the dlib version because the swapping works on images.
I think it has something to do with the first line of the error:

CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638

image

It works for me by changing line 17 in the file face_swap.py

Change it to

self.video = cv2.VideoCapture(0)

0 can be any number of camera attached to your computer. In my case it is 2 to get the usb webcam of my laptop.

image