4

Is it possible to convert a mp4 file to mp3 or flac, clearing background noises in the process?

Or is it possible to run audacity totally trough shell, No GUI?

Stéphane Chazelas
  • 522,931
  • 91
  • 1,010
  • 1,501
matisa
  • 337
  • 1
  • 3
  • 12
  • 3
    Why kind of noise are we talking of? White noise or random people chatting in the background or bangs, scratch or cough noises in a classical music concert recording... How would you identify that noise with audacity? – Stéphane Chazelas Feb 22 '18 at 09:53
  • Class room noises. A bit of chit chat, a bit of paper noises. And the truth is I don't know yet. It is a bit new to me. – matisa Feb 22 '18 at 09:56
  • 1
    Is it a stereo recording? Please add the extra information to you question by clicking the [edit] link – Stéphane Chazelas Feb 22 '18 at 10:15
  • Some of the file will be stereo others not. – matisa Feb 22 '18 at 10:17

1 Answers1

7

If the background noise has some repetitive structure to it, you can remove it with the noiseprof and noisered effects of sox, see e.g. this script. Relevant bits repeated for convenience:

# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof

# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21

Audacity currently has experimental scripting support.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Thor
  • 16,942
  • 3
  • 52
  • 69