Need a quick, easy and free way of cleaning up a video’s audio from background noise ? Follow the steps below to remove background audio from videos.

First get and install the tools:

Then clean your noise!

  1. Split the audio and video streams into 2 seperate files:
    The VIDEO stream: ffmpeg -i input.mp4 -vcodec copy -an tmpvid.mp4
    The AUDIO stream: ffmpeg -i input.mp4 -acodec pcm_s16le -ar 128k -vn tmpaud.wav 
  2. Generate a sample of noise from the audio of the file:
    ffmpeg -i input.mp4 -acodec pcm_s16le -ar 128k -vn -ss 00:00:00.0 -t 00:00:00.5 noiseaud.wav
    -ss: the time offset from beginning. (
    -t duration: the duration ( of audio segment to cut that represents the noise.
    Choose a segment of the audio where there’s no speech, only noise (e.g. speaker was silent for a sec).
  3.  Generate a noise profile in sox:
    sox noiseaud.wav -n noiseprof
  4. Clean the noise samples from the audio stream:
    sox tmpaud.wav tmpaud-clean.wav noisered 0.21
    Change 0.21 to adjust the level of sensitivity in the sampling rates (I found 0.2-0.3 often provides best result).
  5. Merge the audio and video streams back together:
    ffmpeg -i tmpvid.mp4 -i tmpaud-clean.wav -map 0:v -map 1:a -c:v copy -c:a aac -b:a 128k out.mp4
I’m thinking of automating this via a web interface that allows uploading a video file, selection of the noise sample and playing with the noisered levels producing a cleaned version… think it’s a useful tool?
Thanks for all the contributors in the comments!
  • Usp71084

    Thanks..I was looking exactly for this. 

  • Karthik

    THanks! this was very useful!! 🙂

  • Dan LaMotte

    This was very useful. Thanks!

  • thanks for the great feedback 🙂

  • gondoSVK

    is it possible to generate the profile and clean the noise in 1 command?

  • Wish there was, however I don’t think so… I’d also like to find an automatic way to find the time in the video where the noise happens on its own, so that we could generate the profile automatically.

  • gondoSVK

    actually there is:
    sox input.wav -n noiseprof | sox input.wav output.wav noisered – 0.2

    im having consistent noise so i can just take first 0,5s of the sound to profile it

  • you cheated 😉 using pipe is still two separate commands, only called on the same line…

  • gondoSVK

    hah but its not saving/reading anything from the hdd what was the main point of “1 command” anyways 🙂
    edit: by anything i mean profile file :p

  • Pingback: Videolardan Gürültü Kaldırma | Emre Aladağ'ın Kişisel Sitesi()

  • I downloaded FFMPEG and it is a BZ2 file, how do I install the program? Thanks

  • Windows version

  • Wonderful!!! I will make a GUI for this, it’s fking perfect!

  • You should not use `-sameq` option, the name doesn’t mean what you think it does.
    You do not need to re-encode the video stream.
    The command for merging two stream should be:
    ffmpeg -i Ktmpvid.mp4 -i tmpaud-clean.wav -map 0:v -map 1:a -c:v copy -c:a aac -b:a 128k out.mp4