How to extract audio from video files with FFMPEG on Windows

  1. Download FFMPEG for Windows

  2. Open Powershell and use ffmpeg.exe to extract the audio from a video file (mp4, mov, avi)
    You can run this command from same directory where ffmpeg.exe is present, or consider adding to PATH.
    Output audio file is named sample.mp3

.\ffmpeg.exe -i 'C:\Users\elastic\Downloads\2023-05-12 23-55-03.mp4' -q:a 0 -map a sample.mp3

After a while you should see job complete notice:


To extract a specific time range audio from a video file use this command and define staring time and duration using -t flag, or end time with -to flag.
This command will extract audio from the time 10:25 and for a duration of 1 minute and 50 seconds.

ffmpeg -i 'C:\Users\elastic\Downloads\2023-05-12 23-55-03.mp4' -ss 00:10:25 -t 00:01:50.0 -q:a 0 -map a sample.mp3


ffmpeg -i 'C:\Users\elastic\Downloads\2023-05-12 23-55-03.mp4' -ss 00:10:25 -to 00:12:15.0 -q:a 0 -map a sample.mp3