I have a JVC HD camcorder to video tape some presentations. The webcam is not bad but the AC in our room is just too noisy. As I mentioned in a previous post, one can easily remove noise using Audacity. However, the video from the my camcorder has the annoying MTS format. It took me some time to find a way to replace the audio track. To denoise the audio, we have three steps:
- Extract the audio track using ffmpeg, the command is
ffmpeg -i original.mts -acodec copy -vn noisy.ac3
- Denoise the extracted audio track. You can check out my previous post for detail. Let say denoised.wav is the denoised audio track.
- Replace the audio track with the denoised one. Use the command
ffmpeg -i original.mts -i denoised.wav -scodec copy -acodec copy -vcodec copy -f matroska output.mkv