Skip to content

Commit e3444e5

Browse files
committed
3.0: fast and exact cutting.
1 parent 106fc2a commit e3444e5

12 files changed

+1058
-1184
lines changed

BUGS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cutmp3 may crash with segmentation fault in pause seeking.
1+
cutmp3 may crash with segmentation fault in silence seeking.

Changelog

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11

2+
version 3.0:
3+
cutmp3 always uses exact times now, without being slow
4+
improved silence seeking
5+
much faster negative times seeking for cutting from timetable
6+
better ID3V2 parsing
7+
new parameter "-k" keeps old filename and path and appends 0001.mp3, etc.
8+
29
version 2.1.2:
310
old tempfile is removed just before playing new tempfile. Patch by Till Maas.
411

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME=cutmp3
2-
VERSION=2.1.2
2+
VERSION=3.0
33
PREFIX=/usr
44
BINDIR=${PREFIX}/bin
55
DATADIR=${PREFIX}/share

TODO

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
fading would be great
22

3-
remove VBR file length info
4-
TLEN
5-
The 'Length' frame contains the length of the audio file in
6-
milliseconds, represented as a numeric string.
7-
-> copyid3v2()
8-
9-
create ID3V2
10-
11-
support Xing header
3+
fix volume()

USAGE

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
By calling "cutmp3" you will get this:
33

44

5-
cutmp3 version 2.1.2
5+
cutmp3 version 3.0
66

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

1010
cutmp3 -i file.mp3 -a 0:37 -b 3:57 copies valid data from 0:37 to 3:57
1111
cutmp3 -i file.mp3 -f timetable copies valid data described in timetable
@@ -30,12 +30,12 @@ after pressing 'b' will then be the last second inside the new file).
3030
By typing 's' the resulting file will be written to result0001.mp3. If it already exists,
3131
cutmp3 will increase the number to result0002.mp3, result0003.mp3 and so on.
3232

33-
-e switches on exact searching mode, useful for VBR files (-a -b and -f always use the exact mode)
3433
-c copies metadata in non-interactive mode
3534
-C ignores given metadata for the output filename in non-interactive mode
35+
-k keeps old filename and full path and appends 0001.mp3, etc.
3636
-s changes the maximum silence length factor, 0 means infinity
3737
-q switches on quiet mode, cutmp3 won't make any sound, useful for debugging
38-
and piped commands like: "echo 7a9bsq | cutmp3 -i file.mp3"
38+
and piped commands like: "echo 7a9bsq | cutmp3 -q -i file.mp3"
3939

4040
*** CLEVER KEYCODES IN cutmp3: ***
4141
You can seek to the end of the next silence by pressing 'p' (for pause)

cutmp3-2.0.2-filename_default_prefix.patch

-12
This file was deleted.

cutmp3.1

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH CUTMP3 1 "Oct 3, 2014" "cutmp3 2.1.2" "Utility Commands"
1+
.TH CUTMP3 1 "Mar 28, 2015" "cutmp3 3.0" "Utility Commands"
22
.SH NAME
33
cutmp3 \- a fast and leightweight mp3 editor
44
.SH SYNOPSIS
@@ -12,8 +12,9 @@ cutmp3 \- a fast and leightweight mp3 editor
1212
[\-I \fI<file> [\-F]\fP]
1313
[\-d 2]
1414
[\-s \fI<factor>\fP]
15-
\-e
1615
\-c
16+
\-C
17+
\-k
1718
\-q
1819
.SH DESCRIPTION
1920
Cutmp3 is a small and fast command line MP3 editor. It lets you select sections
@@ -54,16 +55,16 @@ The timetable must have the following format:
5455

5556
Negative values mean distance from the end of file.
5657
Note that the options [\-a] and [\-b] override a given timetable.
57-
.IP "-e exact searching mode"
58-
Switch on exact searching mode, useful for VBR files.
59-
.br
60-
Note that [\-a] [\-b] and [\-f] use exact mode as default.
6158
.IP "-q quiet mode"
6259
Switch on quiet mode, cutmp3 won't make any sound, useful for debugging
6360
and commands using a pipe like: "echo 7a9bsq | cutmp3 \-i file.mp3"
6461
.IP "-c copy metadata"
6562
Copies metadata in non-interactive mode. Useful to keep ID3 tags when
6663
using \-a \-b or \-f.
64+
.IP "-C do not copy metadata"
65+
Prevents copying any metadata.
66+
.IP "-k keep old filename"
67+
Keeps old filename and full path and appends 0001.mp3, etc.
6768
.IP "-s maximum silence length factor"
6869
Normally cutmp3 stops when the silence found is longer than 15 times
6970
the minimum silence length. [\-s] changes this factor. 0 means infinity.

cutmp3.desktop

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[Desktop Entry]
22
ServiceTypes=audio/x-mp3
3+
X-TDE-ServiceTypes=audio/x-mp3
34
Actions=cut
45

56
[Desktop Action cut]

cutmp3.h

+38-6
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,47 @@ unsigned int volume(long playpos);
4646
long seeksilence(long seekpos);
4747
long seeksilstart(long seekpos);
4848

49-
long importid3(long seekpos);
49+
/* This function prints the reached ID3 V1 TAG,
50+
argument is next byte after tag */
51+
void showtag(long seekpos);
52+
53+
/* This function prints the reached ID3 V1 TAG */
54+
void print_id3v1(long seekpos);
55+
56+
/* This function prints the reached ID3 V2 TAG */
57+
void print_id3v2(long showpos);
58+
59+
/* This function rewinds to before ID3V1 tag, if any.
60+
Returns position of last byte before tag. */
61+
long rewind3v1(long seekpos);
62+
63+
/* This function rewinds max 100kB to before ID3V2 tag, if any.
64+
Returns position of first byte of tag. */
65+
long rewind3v2(long seekpos);
66+
67+
/* This function gets data from ID3 V1 and returns its length,
68+
argument is end of tag */
69+
int importid3v1(long seekpos);
70+
71+
/* This function gets data from ID3 V2 and returns its length,
72+
argument is start of tag */
73+
long importid3v2(long seekpos);
74+
75+
/* This function skips ID3 V1 tag, if any.
76+
Returns position of next byte after tag. */
77+
long skipid3v1(long seekpos);
78+
79+
/* This function skips ID3 V2 tag, if any.
80+
Useful also for getting the length of the ID3 V2 tag.
81+
Returns position of next byte after tag. */
5082
long skipid3v2(long seekpos);
51-
long showid3(long showpos);
52-
void copyid3(long startpos, long endpos);
5383

54-
void infotag(long seekpos);
55-
int importtag();
84+
/* This function returns the position of the next ID3 TAG,
85+
next byte after V1 and first byte of prepended V2 */
5686
long seektag(long seekpos);
57-
void showtag(long seekpos);
87+
88+
89+
void infotag(long seekpos);
5890

5991
void zaptitle (void);
6092

cutmp3.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Summary: Small and fast command line MP3 editor.
22
Name: cutmp3
3-
Version: 2.1.2
3+
Version: 3.0
44
Release: 1
55
#Epoch: 1
66
License: GPL

0 commit comments

Comments
 (0)