Written by
Imran
on
on
Extracting Audio from Video using Python
0
min read
We’ll start by installing ffmpeg
and moviepy
packages using the following pip command.
Next, we’ll import MoviePy:
Next, we’ll load the Video Clip:
MoviePy supports various video formats like:
- WMV (wmv, wma, asf*)
- OGG (ogg, oga, ogv, ogx)
- 3GP (3gp, 3gp2, 3g2, 3gpp, 3gpp2)
- MP4 (mp4, m4a, m4v, f4v, f4a, m4b, m4r, f4b, mov)
Now, we’ll extract the audio:
Here, we can choose different audio format as our preference. Some formats as listed below:
- MP3
- AAC
- WMA
- AC3 (Dolby Digital)