vim /scripts/splitMP3.sh; # create new script and fill it with (copy & paste)

#!/bin/bash
BIG_AUDIO_FILE=$1;

echo "trying to split "$BIG_AUDIO_FILE;

# split the mp3 audio above into 30min files
mkdir split; X=0; while( [ $X -lt 5 ] ); do echo $X; ffmpeg -i "$BIG_AUDIO_FILE" -acodec copy -t 00:30:00 -ss 0$X:00:00 split/${X}a.mp3; ffmpeg -i half_hour_splits_of_"$BIG_AUDIO_FILE" -acodec copy -t 00:30:00 -ss 0$X:30:00 split/${X}b.mp3;  X=$((X+1)); done;

# now finish editing with :wq!

chmod u+x /scripts/splitMP3.sh; # make script executable

/scripts/splitMP3.sh /folder/to/large.mp3; # test it :)

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin