linux - Bash script to extract first seconds and rename mp3 files in folder -


i have folder several mp3 files need extract 10-15 seconds of audio from. rename these appending sample-(name).mp3 converted files. how can via shell script? in advance!

you need tool ffmpeg accomplish this. there other tools mp3split well.

you can script this.

for each infile in directory:

ffmpeg -t 15 -i infile.mp3 -acodec copy sample-$infile.mp3


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -