Created
May 3, 2017 16:10
-
-
Save VanDavv/368a28ed39ff7cf4d89e069f6de87c60 to your computer and use it in GitHub Desktop.
Simple script for splitting long audio file into same length frangments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LENGTH=300 # length in seconds | |
INPUT="./music.mp3" # path to input file | |
for i in {0..180..5}; do | |
ffmpeg -i $INPUT -t $LENGTH -ss $[$i * 60] -acodec copy "./$i.mp3" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment