May 022009

cutmp3, as the name implies is a simple command line tool to edit and cut MP3 files without loosing any quality. cutmp3 can edit the mp3 files interactively or selection (start time and end time) can be provided from the command line or even better can be used with a timetable fiile specifiying different start/end times from the same MP3 files. cutmp3 saves the output to a seperate MP3 file with causing any harm to the original source file or can also output to the STDOUT.

cutmp3 uses mpg123 to playback and hence needs to be installed or have a symbolic link set to the MP3 player installed on the system.

Install cutmp3 in openSUSE

To install cutmp3 in openSUSE, click this 1-click installer from Packman supported on openSUSE 11.1/11.0/10.3
This should download the YMP file and automatically launch the YaST package manager to add the required Repositories, download and install cutmp3 and the  dependencies. Click next on the cutmp3 installation screen and Next again on the installation proposal window. This should start adding the required repositories, download and install cutmp3 and its required dependencies. Click Finish when the installation completes successfully.

cutmp3 should now be installed as /usr/bin/cutmp3

saihari@opensuse11:~> which cutmp3

In a simple usage,we provide an input/source MP3 file, an output/target MP3 filename, start and end points of selection as follows:

saihari@opensuse11:~> cutmp3 -i Best_Of_Blue_Medley.mp3 -a 0:00 -b 1:00 -O test.mp3
saved 0:00.00 – 1:00.00 to ‘test.mp3′.


-i specifies the input or source file

-O specifies the output file or the file saved to (-o instead of -O will prefix the output file with the name you specifiy)
-a specifies the start point of selection
-b specifies the end point of selection

cutmp3 can work with a timetable file with multiple start and end points instead of specifying in the command. However, if you do specfiy start and end points in a command along with a timetable file then the timetable file gets overriden.

The timetable file format is as follows:

—- 8< cut here —-
0:01    1:00
1:05     3:57
11:15    19:33
01:01.34 02:39.78
0:0       -1:0
—- 8< cut here —-

Note: The ‘:’ is mandatory. Negative time means distance from end of file. Syntax is NOT hh:mm:ss but mm:ss.subeconds

For a complete list of options, simply type the cutmp3 command without any arguments as follows:

saihari@opensuse11:~> cutmp3

cutmp3  version 1.9.5

Usage:  cutmp3 -i file.mp3 [-a inpoint] [-b outpoint] [-f timetable]
[-o outputprefix] [-e] [-c] [-C] [-q]

cutmp3 -i file.mp3 -a 0:37 -b 3:57  copies valid data from 0:37 to 3:57
cutmp3 -i file.mp3 -f timetable     copies valid data described in timetable
cutmp3 -i file.mp3 -o song          writes the output to song0001.mp3, song0002.mp3,…
cutmp3 -i file.mp3 -O song.mp3      writes the output to song.mp3
cutmp3 -i file.mp3 -O –             writes the output to STDOUT
cutmp3 -i file.mp3 -d 2             use second sound card
cutmp3 -i file.mp3 -s 0             no maximum silence length
cutmp3 -I file.mp3 [-F]             prints file information [in raw mode]

Click here to visit project home.