How to cut a MP3 in half?

Duncan Anderson duncangareth at yahoo.co.uk
Mon Apr 3 11:35:48 UTC 2006


On Thursday, 30 March 2006 19:52, Vincent Trouilliez wrote:
> On Thu, 2006-03-30 at 11:06 -0600, Wade Smart wrote:
> > I have to upload an mp3 but its to large (and I didnt create it).
> > Is there a way to cut it in half and then upload it?
>
> Maybe you could just "compress" it to ZIP or tar.gz or whatever format,
> since most archivers can split an archives into several small files,
> typically to fit it onto multiple floppy disks.
>
> --
> Vince

The "old-fashioned way" of doing this, (speaking as an old UNIX support 
person), is the following:

uuencode Track.mp3 Track.mp3 > Track.uu
LINES=`wc -l Track.uu`
SPLITLINES=`expr $LINES / 2`
split --lines=$SPLITLINES Track.uu Track

This will produce two uuencoded parts which can then be compressed:

bzip2 Track??

resulting in Trackaa.bz2 and Trackab.bz2

These can be uploaded, and then later downloaded. The reassembly goes like 
this:

bunzip2 Track??.bz2
cat Track?? > Track.uu
uudecode Track.uu

You will now have the EXACT original file, no loss of any kind.

cheers
Duncan 

		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com





More information about the ubuntu-users mailing list