Python convert wav to mp3

I wrote a python library, pydub, that essentially does what Corey’s Answer suggests, though it uses ffmpeg in to do the conversions in order to support more formats. from pydub import AudioSegment AudioSegment.from_wav(“/input/file.wav”).export(“/output/file.mp3″, format=”mp3”)

using FFMPEG with silencedetect to remove audio silence

Use the silenceremove filter. This removes silence from the audio track only – it will leave the video unedited, i.e., things will go out of sync Its arguments are a little cryptic. An example ffmpeg -i input.mp3 -af silenceremove=1:0:-50dB output.mp3 This removes silence at the beginning (indicated by the first argument 1) with minimum length … Read more