0

I would like to implement a automation of audio enhancement for self created videos.

The videos have all in common

  • the mic is a classical laptop mic (mid quality with lots of white noise)

I have a white noise profile created with audacity and if I manually apply the noise reduction to the audio track the audio sounds nearly like in a studio created.

Now I want to run a app or script to:

  1. apply the noise reduction with a given noise profile and write the new audio file as MP3 to disk
  2. apply the new audio track to the given video (replace existing voice track with the new track)
  3. save the new video as a new file to the disk

Anyone around who can help on this? I need to decide build or buy... And I do not know if even tools exist to automate this steps...

My development requirements:

  • platform neutral language or platform, preferably java

of

if applications exists (e.g. under linux, so nearly platform neutral)

  • the app or packages with a brief description how to handle it (e.g. audacity and ffmpeg but I did not find something helpful to get started)
cilap
  • 2,215
  • 1
  • 25
  • 51

1 Answers1

0

Requirements:

  • sox
  • ffmpeg

Create some longer sample recording where you don't speak at all but capture some common noises for you mic and surrounding.

Convert it to wav, name it noisesample.wav and save it to your video folder. Open command line, navigate to folder and execute:

sox noisesample.wav -n noiseprof noise_profile_file

Create folder mp3

mkdir mp3

Convert every video to mp3 for later processing

for f in *.mp4; do ffmpeg -i "$f" -c:a libmp3lame "mp3/${f%.mp4}.mp3"; done

Change directory to mp3 and apply sox noise reduction (like audacitys) to every mp3 file

cd mp3    
for f in *.mp3; do sox "$f" "${f%.mp3}_new.mp3" noisered noise_profile_file 0.26

Change to parent directory again, create out directory and combine new mp3 files with mp4 files

cd ..
mkdir out
for f in *.mp4; do ffmpeg -i "$f" -i "mp3/${f%.mp4}_new.mp3" -map 0:v -map 1:a -c:v copy -shortest "out/${f%.mp4}.mp4"; done

This should be do the trick you asked for. As long as your noise profile remain the same you can reuse it for all your videos.

Stev
  • 416
  • 4
  • 11