Amir Sharif
Weekend hacker.
Self improvement enthusiast.

Using ffmpeg to reduce background noise


I have a file I recorded. It has background noise I want to remove (fans, clicking, etc.) Works good for fans but a little less well for clicking.

  1. Extract the audio file from the video
ffmpeg -i <path> -vn -acodec copy output-audio.aac
  1. Pipe it through a rnn model.
ffmpeg -i <audiopath> -af arnndn=<path to model>

For path to model I just downloaded the std model from

  1. Recombine the new audio with the video
ffmpeg -i v.mp4 -i a.wav -c:v copy -map 0:v:0 -map 1:a:0 new.mp4

May 2, 2023