How to extract audio from video files with FFMPEG on Windows
![](https://www.elasticourse.com/images/ffmpeg-split_hu86120a3d430d9912d1416e2603db74e2_27922_1500x0_resize_q80_h2_box_2.webp)
Download FFMPEG for Windows
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
![ffmpeg-split1-min](https://www.elasticourse.com/images/ffmpeg-split1-min_hu35120a3b3452b762c192af3b69388370_180496_600x0_resize_q75_box.jpg)
After a while you should see job complete notice:
![ffmpeg-split2-min](https://www.elasticourse.com/images/ffmpeg-split2-min_hu4cff3b9ccc3749c465a11ee8757b2e80_44729_600x0_resize_q75_box.jpg)
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
or
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