I am using ffmpeg for audio conversion. I am using this command:
ffmpeg -i file.mp3 file.wav
This works fine. However I only want to my output file to contain maximum 1 minute of audio. How can I do that using ffmpeg?
I am using ffmpeg for audio conversion. I am using this command:
ffmpeg -i file.mp3 file.wav
This works fine. However I only want to my output file to contain maximum 1 minute of audio. How can I do that using ffmpeg?
Use the
-t
parameter:Use the following command:
-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 fileThis command also works perfect. I cropped my music from 0 seconds to 30 seconds. Here test.mp3 is input file and temp.mp3 is output file.