Skip to content

Commit 982a69d

Browse files
committed
1.8.4: inital commit
0 parents  commit 982a69d

18 files changed

+5573
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*~
2+
*.o
3+
cutmp3

BUGS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cutmp3 may crash with segmentation fault in pause seeking.
2+
This will hopefully be fixed when fading is implemented.

COPYING

+340
Large diffs are not rendered by default.

Changelog

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
2+
version 1.8.4:
3+
added manpage thanks to Marc O. Gloor
4+
5+
version 1.8.3:
6+
fixed major crash, nobody bothered?
7+
8+
version 1.8.2:
9+
temporary files are mostly being removed after usage
10+
fixed bug in tag editing
11+
12+
version 1.8.1:
13+
fixed a bug in case of invalid data after a ID3 V2 tag, reported by Byron F. Martin
14+
15+
version 1.8:
16+
on setting endpoint and after seeking end of silence, file is being played up to this point
17+
greatly improved ID3 V1 + V2 tag import/export/copying and file naming
18+
19+
version 1.7:
20+
added ID3 V2 tag (<2.4.10) seeking
21+
improved file naming for "save with tag"
22+
copies ID3 V2 tag when useful
23+
24+
version 1.6.4:
25+
file info also shows ID3 V1 tag
26+
ID3 V1 tag is being imported
27+
28+
version 1.6.3:
29+
'i' shows file info
30+
fixed a time bug in exact mode
31+
'o' overwrites existing file the next time
32+
33+
version 1.6.2:
34+
switched to four digit numbers
35+
smarter saving with ID3 tags
36+
37+
version 1.6.1:
38+
fixed a small bug in silence seeking reported by Nick Simicich
39+
speeded up silence seeking, hopefully did not introduce new bugs with this
40+
41+
version 1.6:
42+
better handling of large ID3 V2 tags
43+
beginning of sound is now displayed as 0:00 as it should
44+
more output for -F switch
45+
fixed time counting in exact mode
46+
fixed time display in exact mode
47+
improved silence seeking
48+
verbose writing of configuration file
49+
50+
version 1.5.2:
51+
no more minimum filesize
52+
fixed framesize calculation
53+
fixed frame counting method
54+
fixed finding of first valid frame
55+
56+
version 1.5.1:
57+
fixed some small bugs in timetable cutting reported by Don Rozenberg
58+
59+
version 1.5:
60+
added switch to only print sampling frequency and total number of frames
61+
added switch to write to an exactly specified filename
62+
fixed a bug which caused a crash
63+
several translations were added
64+
added usage of configuration file for silence length, silence volume, quiet mode and soundcard number
65+
66+
version 1.4:
67+
added function to search for beginning of next silence
68+
silence seeking stops when silence is already much longer than wanted
69+
noninteractive cutting now supports higher time resolution
70+
added support for output to other soundcard
71+
72+
version 1.3:
73+
when saving with (already included) tag, filename is $artist - $title.mp3
74+
fixed a bug in tag seeking
75+
fixed a bug which made it impossible to write many files
76+
code cleanups
77+
78+
version 1.2:
79+
improved stability of silence seeking a lot
80+
some other small changes
81+
82+
version 1.1.1:
83+
fixed another bug in silence seeking
84+
85+
version 1.1:
86+
introduced a quiet mode, toggable with '#'
87+
introduced an exact mode, useful for VBR files!
88+
cutmp3 does not wait anymore until playback has finished
89+
rewrite of prevframe() and nextframe(), much better and more elegant now
90+
detected another bug in mpglib.c, needs to be resolved
91+
92+
version 1.0:
93+
finally(?!) fixed the bug in silence seeking which was a too small malloc() in InitMP3() in mpglib.c
94+
another speed improvement in silence seeking
95+
website was updated to celebrate version 1.0 ;-)
96+
97+
version 0.9.6:
98+
fixed some nasty bugs in silence seeking, still not perfect however
99+
improved ID3 tag searching
100+
small changes in the UI
101+
102+
version 0.9.5:
103+
huge speed improvement in silence seeking
104+
105+
version 0.9.4:
106+
made non-interactive cutting exact even for VBR files!
107+
distinction between VBR and CBR in info mode -I
108+
109+
version 0.9.3:
110+
fixed small bug in savewithtag()
111+
improved determination of average bitrate
112+
113+
version 0.9.2:
114+
added seek to end of next ID3 v1 tag
115+
116+
version 0.9.1:
117+
improved error correction
118+
119+
version 0.9:
120+
improved ID3 input a lot via libreadline
121+
added configurable silence detection via mpglib
122+
improved prevframe() and nextframe(), still not perfect
123+
124+
version 0.7:
125+
Framesize() is now calculated correct
126+
added first ID3 tag support
127+
128+
version 0.6:
129+
does not display 60 seconds anymore
130+
w is shortcut for bsa
131+
displays time after/before startpoint
132+
fixed internal seeking mechanism (again)
133+
added MPEG2.5 support
134+
introduced -I for file information
135+
added KDE support
136+
137+
version 0.5:
138+
improved mp3 seeking mechanism a lot, should be nearly errorfree
139+
finally cutmp3 officially supports VBR!
140+
141+
version 0.4.1:
142+
minor bugfix for error messages
143+
144+
version 0.4:
145+
A and B go to startpoint and endpoint.
146+
outputfiles are not overwritten anymore
147+
introduced -a <time> -b <time> for a more handy batching as requested
148+
introduced -o <prefix> for other outputprefix than "result" as requested
149+
uses glibc getopt() for better commandline parsing now
150+
151+
version 0.3:
152+
supports timetable for semiautomatic cutting
153+
officially supports files > 2GB
154+
now compiles using $CFLAGS
155+
156+
version 0.2:
157+
initial public release
158+
accidentally supports files > 2GB ;-)
159+

Makefile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
NAME=cutmp3
2+
VERSION=1.8.4
3+
PREFIX=/usr
4+
BINDIR=${PREFIX}/bin
5+
DATADIR=${PREFIX}/share
6+
MANDIR=${PREFIX}/share/man/man1
7+
DOCDIR=${DATADIR}/doc/${NAME}-${VERSION}
8+
9+
all:
10+
@echo -e "\n\n*** You need readline-devel, ncurses-devel or similar to compile ${NAME} ***\n*** Maybe you want to try the binary on compile failures? ***\n\n"
11+
gcc -O ${CFLAGS} -c mpglib.c
12+
gcc -O ${CFLAGS} -c main.c
13+
gcc main.o mpglib.o -o ${NAME} -lm -lreadline -lncurses
14+
15+
i386:
16+
gcc -Wall -O -c mpglib.c
17+
gcc -Wall -O -c main.c
18+
gcc main.o mpglib.o -o ${NAME} -lm -lreadline -lncurses
19+
20+
clean:
21+
rm -f *.o
22+
rm -f ${NAME}
23+
24+
install:
25+
install -d ${BINDIR}
26+
install ${NAME} ${BINDIR}
27+
if [ ! -z "${KDEDIR}" ]; then install -m 644 ${NAME}.desktop ${KDEDIR}/share/apps/konqueror/servicemenus; fi
28+
install -d ${MANDIR}
29+
install -m 644 cutmp3.1.gz ${MANDIR}
30+
install -d ${DOCDIR}/${NAME}
31+
install -m 644 README* USAGE ${DOCDIR}/${NAME}
32+
33+
uninstall:
34+
rm -f ${BINDIR}/${NAME}
35+
rm -f ${KDEDIR}/share/apps/konqueror/servicemenus/${NAME}.desktop
36+
37+
debug:
38+
gcc -g -Wall -O -c mpglib.c
39+
gcc -g -Wall -O -c main.c
40+
gcc main.o mpglib.o -o ${NAME} -lm -lreadline -lncurses

README

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
This is a small program to edit mp3 files without quality loss.
3+
Playback is realized via mpg123, so be sure to have it installed or at least
4+
have a symlink to your favorite mp3 playing program.
5+
I recommend a symlink to mpg321 which works better!
6+
You can mark beginning and end of a segment with 'a' and 'b' and save the
7+
segment with 's'.
8+
Using a timetable or direct times with VBR files delivers exact(!)
9+
results at the cost of slightly lower speed.
10+
cutmp3 even works with files bigger than 2 GB!
11+
12+
If you want a working graphical software you can try mp3directcut,
13+
which runs fairly well in WINE after I asked the author about a WINEd version.
14+
15+
Compile cutmp3 with a simple
16+
17+
make (you will need readline-devel or similar!)
18+
19+
install it to /usr/bin with
20+
21+
make install
22+
23+
Please read "USAGE" on detailed info on how to use cutmp3.
24+
25+
If you experience any trouble with a specific file, please contact me!
26+
27+
Maybe this program is useful for you.
28+
Feel free to modify and distribute it under the license restrictions of the GPL.
29+
See file COPYING for further information.
30+
Send bugreports, comments, suggestions to < mail -at- puchalla-online.de >
31+
32+
Jochen Puchalla, April 2005

README.timetable

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
NOTE: The options -a and -b override a given timetable
2+
3+
A timetable should look like this,
4+
the format is always:
5+
6+
startpoint endpoint
7+
startpoint endpoint
8+
9+
like:
10+
11+
---- 8< cut here ----
12+
0:01 1:00
13+
1:05 3:57
14+
11:15 19:33
15+
01:01.34 02:39.78
16+
---- 8< cut here ----
17+
18+
The ':' is mandatory!
19+
20+
So writing a timetable should not be difficult, just use your common sense ;-)
21+
Since cutmp3 1.4 you _can_ use hundredths of a second in a timetable.

TODO

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tell me :-)
2+
3+
fading
4+
remove /tmp things

USAGE

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
2+
By calling "cutmp3" you will get this:
3+
4+
5+
cutmp3 version 1.8.4
6+
7+
Usage: cutmp3 -i file.mp3 [-a inpoint] [-b outpoint] [-f timetable] [-o outputprefix] [-e] [-q]
8+
9+
cutmp3 -i file.mp3 -a 0:37 -b 3:57 copies valid data from 0:37 to 3:57
10+
cutmp3 -i file.mp3 -f timetable copies valid data described in timetable
11+
cutmp3 -i file.mp3 -o song writes the output to song0001.mp3, song0002.mp3,...
12+
cutmp3 -i file.mp3 -O song.mp3 writes the output to song.mp3
13+
cutmp3 -i file.mp3 -d 2 use second sound card
14+
cutmp3 -I file.mp3 [-F] prints file information [in raw mode]
15+
16+
So this means you have to type
17+
cutmp3 -i file.mp3
18+
to edit the file named "file.mp3" interactively:
19+
With the keys 12345 you can rewind, with the keys 67890 you can go forward.
20+
'0' means 10mins forward, '9' is 1min forward, '8' is 10secs forward, '7' is 1sec forward
21+
and '6' is 1/10sec forward. Keys '1' to '5' go symmetrically back (so '1' means 10mins back).
22+
When you are at the starting position of your part of interest, press the key 'a'.
23+
When you are at the last position of your part of interest, press the key 'b' (What you hear
24+
after typing 'b' will then be the last second inside the new file).
25+
By typing 's' the resulting file will be written to result0001.mp3. If it already exists,
26+
cutmp3 will increase the number to result0002.mp3, result0003.mp3 and so on.
27+
28+
-e switches on exact searching mode, useful for VBR files (-a -b and -f always use the exact mode)
29+
-q switches on quiet mode, cutmp3 won't make any sound, useful for debugging
30+
and piped commands like: "echo 7a9bsq | cutmp3 -i file.mp3"
31+
32+
*** CLEVER KEYCODES IN cutmp3: ***
33+
You can seek to the end of the next silence by pressing 'p' (for pause)
34+
or to its beginning by pressing 'P'.
35+
By default the silence should last for 1000 milliseconds, which is one second,
36+
and the maximum volume during this second is the minimum: 1 (whatever that is in dB).
37+
You can change
38+
- the length of the silence by pressing 'n' or 'm' and
39+
- the maximum volume during this silence by pressing '+' or '-'.
40+
41+
You can seek to the next ID3 tag by pressing 'T'. This is useful in
42+
case someone has merged several mp3s into one file without removing the ID3-tags.
43+
44+
For other useful keycodes type 'h' in cutmp3.
45+
46+
47+
By typing:
48+
cutmp3 -i file.mp3 -o blah
49+
the resulting files will be written to blah0001.mp3, blah0002.mp3, blah0003.mp3 and so on.
50+
51+
If you only want to cut a file once and you know the times for start and the end, you type:
52+
cutmp3 -i file.mp3 -a 0:37 -b 1:25
53+
and cutmp3 will write the passage in file.mp3 starting at 0:37 and ending at 1:25 to blah01.mp3
54+
55+
If you want to cut a file more often, you need to create a file which contains a timetable and type:
56+
cutmp3 -i file.mp3 -f name_of_the_timetablefile
57+
Please read README.timetable for details.
58+
59+
NEW: You can use the second soundcard by typing
60+
cutmp3 -i file.mp3 -d 2
61+
62+
cutmp3 -F -I file.mp3
63+
only prints total number of frames, sampling frequency, number of channels, average bitrate,
64+
MPEG version and total time in milliseconds, in this order
65+
66+
If you want to clean an MP3 from any data that is not sound, just use:
67+
cutmp3 -i infile.mp3 -a 0:0 -b 99999:0
68+
Cutting in interactive mode does _not_ remove invalid data!
69+
70+
cutmp3 only accepts one inputfile, so using wildcards like '?' or '*' in filenames
71+
will result in editing only the first file that matches.

0 commit comments

Comments
 (0)