Use the following command:
ffmpeg -ss 0 -t 30 -i file.mp3 file.wav
-ss 0– Start at 0 seconds-t 30– Capture 30 seconds (from 0, so 0:00 – 0:30). If you want 1 minute of audio, use-t 60.file.mp3– Input filefile.wav– output file
Use the following command:
ffmpeg -ss 0 -t 30 -i file.mp3 file.wav
-ss 0 – Start at 0 seconds-t 30 – Capture 30 seconds (from 0, so 0:00 – 0:30). If you want 1 minute of audio, use -t 60.file.mp3 – Input filefile.wav – output file