Talk to us
Talk to us

How to Remove Background Noise from Video

How to Remove Background Noise from Video

Background noise can be a major distraction in videos, making it difficult to hear the audio clearly. There are a number of ways to remove background noise from video, both free and paid. In this article, we will discuss how to remove background noise from video for your Android applications with ZEGOCLOUD SDK.

How Does AI Noise Suppression Work?

In today’s digital age, communication, and content creation have become essential aspects of our lives. However, background noise can often hinder the clarity and quality of audio recordings, video calls, or podcasts. To overcome this challenge, Artificial Intelligence (AI) noise suppression technology has emerged as a powerful solution. By leveraging advanced algorithms, AI noise suppression enhances audio quality by reducing unwanted background noise. In this section, we will delve into the workings of AI noise suppression and shed light on its fascinating mechanism.

Understanding AI Noise Suppression

AI noise suppression employs machine learning techniques to identify and separate noise from desired audio signals. It operates by analyzing the spectral and temporal characteristics of the audio to discern noise patterns. The process involves several key steps:

1. Audio Input

The AI noise suppression system takes in the raw audio data, which contains both the desired signal and the unwanted background noise.

2. Noise Identification

Using advanced algorithms, the system identifies the segments in the audio that correspond to noise. These algorithms can distinguish between different types of noise, such as steady-state noise (e.g., fan or air conditioning) and non-stationary noise (e.g., conversations or traffic).

3. Noise Modeling

AI noise suppression creates a statistical model of the identified noise based on its characteristics. This model helps in isolating and suppressing unwanted noise while preserving the desired audio signal.

4. Noise Removal

The AI system applies adaptive filtering techniques to attenuate or eliminate the noise components from the audio. This process ensures that the resulting output maintains clarity and naturalness.

5. Output Enhancement

After the noise reduction process, the AI system optimizes the audio output, further enhancing its quality. It may involve techniques such as equalization, dynamic range compression, or audio normalization to improve the overall listening experience.

How to Remove Background Noise for Your Android App

Delivering high-quality audio experiences is vital for the success of any Android app. However, background noise can often degrade the audio quality and compromise the user experience. To address this challenge, ZEGOCLOUD offers an exceptional solution that empowers developers to remove background noise seamlessly. By leveraging advanced 3A technologies, ZEGOCLOUD ensures optimal audio processing and enhancement. In this section, we’ll deliberate on the prerequisites and how to implement background noise removal with ZEGOCLOUD.

ZEGOCLOUD’s Background Noise Removal Features

ZEGOCLOUD enhances audio quality and user experience by incorporating advanced 3A technologies. These technologies, including AEC, AGC, and ANS, enable efficient audio processing and ensure optimal sound performance.

1. Acoustic Echo Cancellation (AEC)

By removing echoes from the audio signal captured by the device’s microphone, AEC ensures a clearer and echo-free audio experience. ZEGOCLOUD’s SDK efficiently filters the collected audio data, eliminating unwanted echoes.

2. Automatic Gain Control (AGC)

This feature automatically adjusts the receiver’s audio gain, amplifying the sound to an optimal level. Although the sound quality might be slightly affected, AGC ensures balanced volume levels for a better listening experience.

3. Active Noise Cancellation (ANC)

With ANC, ZEGOCLOUD utilizes a range of audio technologies to actively cancel ambient noise. Enabling this feature enhances the clarity of the user’s voice, resulting in improved audio quality.

ZEGOCLOUD supports headphone monitoring and stereo, which can be configured to your needs. These features include:

  • Headphone Monitoring: This process involves real-time audio feedback by feeding the captured audio from the device’s microphone to the connected headphones or wireless Bluetooth earbuds. It enables users to monitor their audio input accurately.
  • Stereo: ZEGO Express SDK supports stereo capabilities, utilizing two independent audio channels to create a realistic sound experience. By enabling stereo audio capturing and stream publishing, developers can achieve higher sound quality when necessary.


Once you have met the prerequisites, you can follow the guides below to begin implementing background noise removal.

Set up the Acoustic Echo Cancellation (AEC)

Before calling methods such as startPublishingStream, startPlayingStream, startPreview, createMediaPlayer, and createAudioEffectPlayer, you need to make the following calls:

  1. To enable the AEC feature, use the enableAEC method.
  2. (Optional) For enabling AEC with headphones, use the enableHeadphoneAEC method.
  3. To set the AEC mode, use the setAECMode method.

Here’s an example of setting the AEC to the medium mode (ZegoAECMode.MEDIUM):

// Enable the AEC feature.
// Enable the AEC when using headphones.
// Configure the AEC to operate in the medium mode (ZegoAECMode.MEDIUM) for optimal performance.

Set up the Automatic Gain Control (AGC)

To activate the AGC feature, simply call the enableAGC method prior to using the following methods: startPublishingStream, startPlayingStream, startPreview, createMediaPlayer, and createAudioEffectPlayer.

By enabling the AGC through the enableAGC method, the SDK will dynamically adjust the microphone volume to accommodate both close and distant sound sources, ensuring a stable and consistent volume level.

// Enable the AGC feature.

Set up the Active Noise Cancellation (ANC)

Before using methods like startPublishingStream, startPlayingStream, startPreview, createMediaPlayer, and createAudioEffectPlayer, ensure you follow these steps to implement the ANS feature:

  1. To enable ANS, call the enableANS method.
  1. (Optional) For controlling or eliminating transient noise like keyboard typing or table noise, use the enableTransientANS method.
  1. To set or adjust the ANS mode, utilize the setANSMode method. The default mode is medium (ZegoANSMode.MEDIUM).

Here’s an example of setting ANS to the soft mode (ZegoANSMode.SOFT):

// Enable the ANS feature.
// Enable the transient ANS feature to control the transient noise.
// Optimize the ANS by setting it to the soft mode (ZegoANSMode.SOFT)

The image below displays the default and recommended audio 3A processing configurations in the ZEGOCLOUD Express SDK.

how to remove background noise from video

Set up headphone monitoring

Once you have initiated the local video preview or started publishing a stream, simply call the enableHeadphoneMonitor method to activate headphone monitoring. This enables you to hear your own audio through the connected headphones.

For optimal performance of headphone monitoring, ensure that the monitoring headphones are securely connected to the device you are using.


To customize the volume for headphone monitoring, use the setHeadphoneMonitorVolume method. This allows you to adjust the volume of the captured audio specifically for headphone monitoring purposes. The volume parameter accepts values between 0 and 200, with the default set at 100.


Set up stereo

For the setAudioConfig and setAudioCaptureStereoMode methods to function properly, it is essential to call them before invoking the startPublishingStream, startPlayingStream, startPreview, createMediaPlayer, and createAudioEffectPlayer methods.

To enable stereo coding before publishing a stream, use the setAudioConfig method to configure the desired audio quality and set the channel property to stereo coding.

ZegoAudioConfig audioConfig = new ZegoAudioConfig(ZegoAudioConfigPreset.HIGH_QUALITY_STEREO));

To enable stereo mode for audio capturing or stream publishing, use the setAudioCaptureStereoModemethod. Set the Mode property accordingly based on your specific requirements. It’s important to note that stereo mode is disabled by default, so you need to explicitly enable it using this method.



Removing background noise from videos is crucial for enhancing their quality and delivering a seamless viewing experience. By utilizing advanced noise reduction techniques and tools, such as AI-based algorithms or dedicated software like ZEGOCLOUD, content creators can effectively eliminate unwanted noise and improve audio clarity. Whether it’s for professional video production or personal projects, prioritizing background noise removal ensures that viewers can focus on the intended content without distractions, resulting in a more immersive and enjoyable video-watching or streaming experience.

You may also like: How to Remove Background Noise from Audio

Talk to Expert

Learn more about our solutions and get your question answered.

Talk to us

Take your apps to the next level with our voice, video and chat APIs

Free Trial
  • 10,000 minutes for free
  • 4,000+ corporate clients
  • 3 Billion daily call minutes

Stay updated with us by signing up for our newsletter!

Don't miss out on important news and updates from ZEGOCLOUD!

* You may unsubscribe at any time using the unsubscribe link in the digest email. See our privacy policy for more information.