Skip to content

Instantly share code, notes, and snippets.

@VanDavv
Created May 3, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VanDavv/368a28ed39ff7cf4d89e069f6de87c60 to your computer and use it in GitHub Desktop.
Save VanDavv/368a28ed39ff7cf4d89e069f6de87c60 to your computer and use it in GitHub Desktop.
Simple script for splitting long audio file into same length frangments
#!/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