mp3_chunk music splitter

Allan Kelly : mp3_chunk music splitter

Split big MP3 files into sequential tracks

Download

mp3_chunk splits big MP3 files into time-length chunks, retaining ID3 tags. This is very useful for example for radio shows - many MP3 players resume from the start of the current track and have very slow fast-forward (mine does). So, 1 hour into a 2 hour show you arrive at work, switch off the player and resume in the evening - back to the start. mp3_chunk splits the show into chunks so you can better control where to restart.

Each chunk has the ID3 tags preserved, with the chunk number pre-pended to the Title. All chunks are created in a directory named as the source file. That's all.

An Example

I have a file called "1 - Late Junction - 20050615.mp3" which is 160kB and 113:57 mins. I decide I want this split into 10 minute chunks. With mp3_chunk.pl on my PATH, I can simply do this:

C:\our_stuff\music\Radio\Late Junction>mp3_chunk.pl 10 "1 - Late Junction - 20050615.mp3"
album: 20050615
artist: Late Junction
comment:
genre:
genre_num: 255
title: Track01
year: 2005
Output Directory == ./1 - Late Junction - 20050615/
Chunk 1 at frame 22969, total_time == 600.006530612178s
Chunk 2 at frame 45938, total_time == 1200.01306122436s
Chunk 3 at frame 68907, total_time == 1800.01959183653s
Chunk 4 at frame 91876, total_time == 2400.02612244871s
Chunk 5 at frame 114845, total_time == 3000.03265306089s
Chunk 6 at frame 137814, total_time == 3600.03918367307s
Chunk 7 at frame 160783, total_time == 4200.04571428525s
Chunk 8 at frame 183752, total_time == 4800.05224489742s
Chunk 9 at frame 206721, total_time == 5400.0587755096s
Chunk 10 at frame 229690, total_time == 6000.06530612178s
Chunk 11 at frame 252659, total_time == 6600.07183673396s
Chunk 12 at frame 261751, total_time == 6837.57714285635s
Finished.

C:\our_stuff\music\Radio\Late Junction>dir "1 - Late Junction - 20050615"
 Volume in drive C has no label.
 Volume Serial Number is 7074-2C9F

 Directory of C:\our_stuff\music\Radio\Late Junction\1 - Late Junction - 2005061
5

16/06/2005  15:23    <DIR>          .
16/06/2005  15:23    <DIR>          ..
16/06/2005  15:23        14,400,283 001 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 002 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 003 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 004 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,284 005 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 006 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 007 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,284 008 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 009 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 010 1 - Late Junction - 20050615.mp3
16/06/2005  15:23        14,400,285 011 1 - Late Junction - 20050615.mp3
16/06/2005  15:23         5,700,255 012 1 - Late Junction - 20050615.mp3
              12 File(s)    164,103,386 bytes
               2 Dir(s)  10,547,118,080 bytes free
	      

Dependencies

This is a Perl program, written on Windows with ActiveState Perl. To run it, you need a Perl environment with 2 non-default libraries. ppm will sort these out for you.

use MPEG::Audio::Frame;
use MP3::ID3v1Tag;
   
Last Updated
Mon Jun 28 22:00:05 2010