


The output audio will be encoded with the given audio bitrate.įor now we need only the audio so the -vn option is used to remove the video from the output file.Ĭonversion of video / audio is very simple using FFmpeg, But our requirement is to do this programmatically using python. Optional and it is used to mention a particular audio bitrate. mp3Įven a mp4 video can be converted to any of the audio formats ffmpeg -i input_video. under a wide variety of build environments, machine architectures, and configurations.Ĭonverting the audio / video using FFmpeg ffmpeg -i input_audio. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. No matter if they were designed by some standards committee, the community or a corporation. It supports the most obscure ancient formats up to the cutting edge. The dependencies can be installed by running the following commands on your terminal.įFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. We are going to use Pydub library for the conversion In this article we are going to see how to convert the audio from one format to another by using Python.
