An advanced lip syncing software, allowing you to change the lip movements in a high resolution video file to match a provided voice from an audio file. This repository contains the code to easily perform the synchronization using the power of Wav2Lip and GFPGAN on Google Colaboratory.
- Visit this link to launch the program in Google Colab.
- Run the first code block labeled "Installation". This will take 1-2 minutes.
- Upload a video file and audio file to the
wav2lip-HD/inputs
folder in Colab. - Change the file names in the block of code labeled
Synchronize Video and Speech
and run the code block. - Once finished run the code block labeled
Boost the Resolution
to increase the quality of the face. - Download your file from
wav2lip-HD/outputs
likely namedoutput_0000.mp4
.
- There is some weird artifacting around the lips in my output. How do I fix this?
If your output has odd lip shape or artifacts, use the --nosmooth command in the second code block.
- My video contains two speakers / pairs of lips, what do I do?
The video file should contain only one face. To handle two faces, mask out one of the faces in your video editor of choice, then process each half seperately. Afterward, recombine the two halfs of the video in your video editor.
- I got an error saying a face wasn't detected? What happened?
Every frame of the video MUST contain the face or the program will crash. If every frame contains the face, it is possible the program is unable to see the face in certain frames. Try splitting your video and processing it in two parts to see where the issue exists.
- The software will trim the video if audio ends first. To bypass, add a snippet of blank audio to your audio file to make it longer than the video, then trim the video after processing.
- You will need to combine the audio and video into a single file after processing.
- The software cannot handle extreme poses or face positions.
Software like this can be easily abused for unethical and immoral purposes, but there are several ethical use cases for this type of software.
- Creating High Quality Dubbings - This software can be used to make film dubbing more effective, by syncing the lip movement of the actors to the new dubbed audio.
- Modifying Lines of Dialogue - Directors may choose to modify a line of dialogue in post-production. With this software, the lips can be synced to the new audio without reshooting the scene.
- Removing Expletives - Directors may choose to remove some curse words for the sake of better film rating. With this software, the lips can be synced to the audio without the expletives, hiding the fact that it was removed.
Originally created by @ajay-sainy, this repository contains an updated Google Colab file for ease of use, as well as, an updated requirements.txt, which is necessary to run the code on today's version of Google Colab.