Home
RSS 2.0 news feed
News Archive
Search

Public Sources
  All my github repos

Git repositories
  logproc
  ausadmin-web
  get-cert
  fat-set-uuid
  djbdns
  LS30
  TRS-80
  xbee-controller
  alpine-mojo-base
  docker-eagle
  zmac
  smallc
  dc20
  perl-sql-tools
  avr-onewire
  avr-fd-serial
  get-cert

Projects
  Electronics
  Arduino RFID Door Lock
  XBee network controller
  Hardware
  LS30 Burglar Alarm
  Online store
  Software
  logrun
  math-trainer
  mp3cd-tools
  fakepop
  aunic-modify
  ausadmin
  sms-notify
  apt-cacher
  video-capture
  wav-fixer
  misc

TRS-80 software I wrote
  System-80 Gallery
  Zeta BBS
  Utilities
  Printer Utils
  Patches
  Operating Systems
  Library of C
  Languages
  Include files
  Hardware
  Games
  FORTRAN Programs
  File Utils
  Disk Utils
  Comms Programs
  CMD File Utils
  BASIC Programs
  Uni Assignments

My PGP Key

Hats I wear
  aus.* newsgroups
  www.news-admin.org

Philosophy
  New Technology
  Ethical Internet Advertising
  Digital Freedom
  Anti-spam
  Age of plenty
  Ditch Windows

Technical
  Big Server
  Spam

Unclassified
  Zeta Internet
  Links

Your donation gives me time
to develop more cool free stuff

Stop the Australian (Anti)Vaccination Network

Out Campaign

Nick Andrew - Projects - Mp3 CD Tools

Mp3 CD Tools

This package contains a program which burns directories of Mp3 files (albums) to CD-R, in an efficient way (i.e. minimising the amount of wasted CD-R space) while putting your more favourite albums toward the beginning of the set.

Here's the README file from the package:

This cute little program helps to burn a bunch of CDs filled with MP3 files, for use with an MP3 CD player. My MP3 CD player is a very cheap one and it is unable to handle MP3s with long filenames, so this tool assists by using short names for each file and directory.

You will need up to 1.3 gigs of free disk space to use this tool successfully, as it copies the music into a directory tree (that's up to 650 megs) and makes an ISO9660 filesystem from it (that's another 650 megs).

The idea is:

  • Select directories containing MP3s
  • Arrange the directories into most-favourite to least-favourite
  • Run mp3cd-pack to compute an optimum packing order for each CD-R
  • All CD-Rs do not have to be burnt at the same time
  • Run mp3cd-mkisofs-burn to burn one or more CD-Rs as desired

mp3cd-pack uses these rules to decide what goes where:

  • There is one album per directory. Whole albums are kept together.
  • Most favourite music is placed onto disc first
  • Pack as much music as possible onto each CD-R

The way it works is that mp3cd-pack works its way through your directory list, from top to bottom. It computes the size of the MP3s in each directory, and marks that directory to go onto the first planned CD-R which has enough free space to contain it. If none of the planned CD-Rs has enough space, then it adds another CD-R to the planned list. The result is that your most favourite music goes on the first CDs with minimal wasted space.

TO INSTALL:

  • You will need "cdrecord" and "mkisofs" installed.
  • Simply copy mp3cd-* into your "bin" directory, and "chmod a+x" the files.

TO RUN IT:

First, create a list of your MP3 directories:

	find $HOME/Mp3 -type d -print | sort > mp3-dirlist

Second, edit this list of directory names. Put your favourite music closer to the top of the file, and less-popular music below. Your list will probably contain parent directories which do not contain any MP3 files; you can leave them in the file because these will be ignored by mp3cd-pack.

Now run mp3cd-pack to calculate a packing order:

	mp3cd-pack 650 < mp3-dirlist > pathlist 2> pathlist-cmds

Now create a directory tree containing the files to go onto one or more CD-Rs. The directory structure used is like:

	01/23/001.mp3

Where "01" is the CD number (starting from 01), "23" is the album number within the CD (also starting from 01) and "001.mp3" is the filename, which starts from 001. The brevity of these filenames is required for my MP3 player, otherwise it runs out of buffer space and will not play the disc.

Look through the pathlist file to find out which albums have been planned for which disc. You may find that you would like to move some albums around, if so then edit your dirlist file again and rearrange the directories, then re-run mp3cd-pack.

Once you are happy with the packing, you need to create a directory tree. To create a directory tree for disc 1, do this command:

	mp3cd-dirtree 01 < pathlist-cmds

(this will use up to 650 megabytes of your disk space).

Now you will want to burn a disc:

	mp3cd-mkisofs-burn 01

(you might want to check that mk3cd-mkisofs-burn issues the correct "cdrecord" command for your burner, before running it).

When done, remove the unwanted files:

	rm -f 01
	rm -f mp3-01.iso

Now you're done!

mp3cd-pack creates a "pathlist" file containing a list of every file on every disc. You might want to print this one out.

Download