You've recorded a video and noticed that your lips are moving but the words are either late or early or what some people refer to as "lag." For many video editors "lip-sync" is a problem that can happen with any broadcasting software. In Google Chrome, when streaming with WebRTC it happens a bit more often if your computer's processor is not able to keep up. This article outlines some troubleshooting steps you can follow to resolve these issues.
WebRTC and How It Works
The way WebRTC streams is by processing the audio and video separately. They are streamed separately, they travel across the internet separately, and it is your computer at home that has to put it back together in sync. When a moment in time of the audio and video are sent across the internet too far apart from one another, the result is audio that does not match video. That is how WebRTC handles this process.
Audio processing is relatively easy for a computer, there are less data to manage. Video is another story - it takes a substantial amount of data and processing to produce a video signal. Your CPU (central processing unit) or brain of the computer can only handle so many calculations at a time. If there is too much data to process when streaming, generally the video gets processed slower than audio. The result is audio encoding first, and the video lagging behind, i.e., hearing your audio first and then seeing the video catch up.
Below is an example of de-synchronization:
Below is an example of the expected outcome:
Troubleshooting Audio Desync and Video Lag Issues
To fix this issue, or at least get your video working to its optimal performance, you need to understand the variables that can free up your computer's CPU from tasks, or reduce the amount of video data to process.
Make sure your browser is running on the latest version. Google Chrome is constantly making improvements to their browser, with it comes fixes and enhancements. Follow the instructions in the Google Chrome Help article to check and keep your Google Chrome browser version up to date.
Try using your internal microphone and camera and see if the audio sync is better - it is a good way to eliminate hardware issues.
Make sure you are on a stable network connection! Ethernet connection is the easiest way to ensure a stable network connection. Check if your router/modem is up-to-date and capable of handling the upload speeds necessary to stream.
Turn off any software running on your computer that you do not need for streaming. Anything to free up your CPU will help. Close all unnecessary browser windows and tabs, music recording software, video games, and any video intensive software. If you do not need it for your stream, close it.
Adjust your webcam to a lower setting. Your webcam may be set to HD settings. The encoder then has to convert that video to lower quality for streaming - that takes a lot of CPU power to do that. If you can, try it and see the result.
Remove or avoid using any webcam effects from your broadcast such as face filters, webcam filters, green-screen effects, etc. All these require CPU processing to generate.
Remove any lighting effects in your home studio. The least amount of background noise, the better. This reduces the amount of bandwidth needed to stream and process.
Check if Google Chrome's Hardware Acceleration is enabled. If it is, try turning it off and seeing the result. If it is not, try turning it on. On certain machines, this setting can cause issues.
Check your computer's hardware settings check if there are any hardware acceleration settings. You will want to have those on since streaming is a hardware-intensive process. The key here is to maximize the CPU and GPU (graphics processing unit) settings
Hopefully, this helps you answer some questions and gives you some ideas on how to make your stream optimized for your system. If you still need help, do not hesitate to contact Socialive Support.
Still, looking for an answer?
Contact Socialive Support via live chat or email at firstname.lastname@example.org.