views:

687

answers:

2

How can I break a large mp3 file into one or more mp3 files, and still have each part playable in a media player?

+2  A: 

It's probably not going to be super easy to break an mp3 file into separate playable mp3 files. There is header information in the mp3 file that you will need to include in all of the split-up files. You might need to get a book or look for a file spec on mp3s, so you know what you're dealing with.

You might be best-off looking for a library that can deal with mp3 files, rather than trying to do it yourself with a FileStream.

Andy White
+3  A: 

Actually, breaking a MP3 file into seperate playable MP3 files is quite easy. A MP3 file consists of a lot of individual frames of iirc 1500bytes, where each has it's own header. Invalid data will be ignored by the player.

But, it would be a lot better if you where to split your files on frame boundaries, creating correct mp3 files. More info on the frame header can be found on this site: http://www.mp3-tech.org/programmer/frame_header.html

Please also consider the possibility that the music is prepended and/or appended with various meta tags, like ID3, APE and lyrics.

MarkO