Content-type: text/html
mp3splt --- Utility for mp3/ogg splitting without decoding
mp3splt [OPTIONS] FILE1 [FILE2] ... [BEGIN_TIME] [TIME2] ... [END_TIME]
FILE: mp3 or ogg file to be split. If you want to specify STDIN as input, you can use "m-" (or "-") when input is mp3, and "o-" when ogg. Multiple files can be specified, all files will be split with the same criterion.
TIME FORMAT: begin_time and end_time must be in this form:
minutes.seconds[.hundredths]
Multiple split points can be specified. After the minimal 2, another indefinite number of split points can be specified. Each split point will be an end time for the previous, and a begin for the following. If you want to reach the end of file, you can use "EOF" as last splitpoint.
mp3splt is a free command-line utility that allows you to split mp3 and ogg files from several splitpoints, without need of decoding and reencoding. It is useful to split large mp3/ogg to make smaller files or to split entire albums to obtain original tracks.
If you are splitting an album you can get splitpoints and filenames automatically from servers on internet like freedb.org, tracktype.org or from a local .XMCD (.CDDB) or .CUE file (see -c option), with the possibility to adjust them automatically with silence detection (see -a option).
You can also try to split files automatically with silence detection (see -s option), or by a fixed time length (see -t option)
Or if you have a file created either with Mp3Wrap or AlbumWrap, you can easily split it just with one command (see -w option).
NOTE for MP3: usually mp3splt understands if mp3 is VBR by checking the presence of a Xing or Info header and will consequently start in framemode, but if this is not present, mp3splt will start in standard mode. This means that splitting process will be quicker, but will be imprecise due to variable bitrate, you can split those VBR files only with framemode (see -f option).
NOTE about TAGS: by default, mp3splt will put the original tags in the split files. Custom tags for the split files can be set with the -g option.
NOTE about MP3 TAGS: in order to extract the original tags from mp3 files, libmp3splt must be compiled with 'id3tag' support. By default, the output files will have the same ID3 tag version as the input file. However, ID3V1 output can be forced with the -1 option and ID3V2 with the -2 option.
NOTE about the OUTPUT DIRECTORY: by default, mp3splt will put the split files in the directory of the input file. In order to change the output directory, you can use one of the following options : -d or -o. Please note that directories from the -o option will be created relative to the input file directory.
Mp3Wrap (http://mp3wrap.sourceforge.net): This tool joins two or more mp3 files in one large playable file that usually contains the string MP3WRAP in filename and a special comment in ID3v2. If the file you are splitting is a Mp3Wrap file the splitting process will be very fast and you will obtain all files just with one command. If your filename contains MP3WRAP and you have errors or you don't want to use wrap mode, just remove it from the file.
AlbumWrap: mp3splt is compatible also with albumwrap files, which usually contain the string ALBW in filename and ID3v2 contains AlbumWrap. But, as AlbumWrap extractor, mp3splt doesn't give any warranty.
Note about "mp3splt.log" :
The first line contains the name of the split file
The second line contains the threshold and the minimum silence length
The next lines contain each one three columns :
-the first column is the start position of the found silence (in seconds.fractions)
-the second column is the end position of the found silence (in seconds.fractions)
-the third column is the length of the silence in hundreths of seconds
(second_column * 100 - first_column * 100)
If you want to get informations from Internet, SOURCE must have one of the following formats :
query
query{album}
query{album}(ALBUM_RESULT_NUMBER)
query[search=protocol://SITE:PORT,get=protocol://SITE:PORT]
query[search...]{album}
query[search...]{album}(ALBUM_RESULT_NUMBER)
If a string is specified between '{' and '}', then the internet search is made on this string and the user will not be requested to interactively input a search string. The number between '(' and ')' is for auto-selecting the result number ALBUM_RESULT_NUMBER; thus, the user will not be requested to interactively input a choose result.
The other parameters between '[' and ']' are used to specify the protocols and the sites. If those parameters are not specified, default values will be chosen, which are good enough in most cases. Inside the square brackets, 'search' defines the CDDB search protocol and site (for searching the disc ID from the album and title); 'get' defines the CDDB download protocol and site (for downloading the CDDB file from the disc ID). Valid 'search' protocols are : 'cddb_cgi' and 'cddb_protocol'. Valid 'get' protocols are : 'cddb_cgi'.
Examples :
query[search=cddb_cgi://tracktype.org/~cddb/cddb.cgi:80,get=cddb_cgi://tracktype.org/~cddb/cddb.cgi:80]
query[get=cddb_protocol://freedb.org:8880]
query[get=cddb_cgi://freedb.org/~cddb/cddb.cgi:80]
Mp3splt will connect to the server and start to find the requested informations. If the right album is found, then mp3splt will query the server to get the selected album and (if no problem occurs) will write a file named "query.cddb" from which will get splitpoints and filenames.
IMPORTANT NOTE FOR CDDB: File split with this option can be not very precise due to:
1) Who extracts CD tracks may use "Remove silence" option. This means
that the large file is shorter than CD Total time. Never use this option.
2) Who burns CD may add extra pause seconds between tracks. Never do it.
3) Encoders may add some padding frames so that file is longer than CD.
4) There are several entries of the same cd on CDDB. In mp3splt they appears with "\=>" symbol.
Try some of them and find the best for yours; usually you can find the correct splitpoints, so good luck!
YOU CAN USE -a OPTION TO ADJUST SPLITPOINTS!
<name1=value,name2=value,..>
You can specify an indefinite number of them, with no spaces and separated by comma. Available parameters are:
Offset visualization :
v off=0 v off=1
++++ ... ++++++++++++++++++++++----------++++++++++ ... +++++
^off=-0.5 ^off=1.5
^off=-1 ^off=2
^off=-1.5
^off=-2
Legend : pluses are 'audio', minuses 'silence', 'v' down-arrow, '^' up-arrow and '...' a segment of the audio file (silence or audio)
It can contain name variables, that must begin with @ char and that can be:
@a: artist name
@p: performer of each song (only with .cue)
@b: album title
@t: song title*
@n: track number identifier* (not the real ID3 track number) (a digit may
follow the 'n' for the number of digits to output)
@f: input filename (without extension)
When split files are more than one, at least one between @t and @n (*) must be present to avoid ambiguous names. You can put any prefix, separator, suffix in the string, for more elegance. To make easy the use spaces in output filename without interfering with line parameters, you can use the char '+' that will be automatically replaced with a space. Valid examples are:
@n_@a_@b_@t
@a+-+@n+-+@t (default if using -c and -o is not specified)
@a/@b/@t_@n (will create the directories '<artist>' and '<artist>/<album>')
@a: artist name
@b: album title
@t: audio title
@y: year
@c: comment
@n: track number
@o: set original tags
@N: auto increment track number :
this variable has to be placed inside the %[] field in order to have the track
number auto incremented for all the split files following it
Example of tags format : %[@o,@N=1,@b=special_album][@a=foo,@b=bar][@t=footitle]. In this example, the first split file will have the original tags with album tag replaced by 'special album'; the second split file will have the tags of the first split, with the artist tag replaced by 'foo' and the album tag replaced by 'bar'; the third split file will have the tags of the first split, with the title tag replaced by 'footitle'. The track number will start at 1 for the first split file and auto increment to the other files.
mp3splt album.mp3 54.32.19 67.32 -o out
mp3splt album.ogg 54.32.19 67.32 -o out
This is the standard use of mp3splt for constant bitrate mp3 or for any ogg. You specify a begin time (which in this case uses hundredths, 54.32.19), an end time and an output file.
mp3splt -f -d newdir album.mp3 album2.mp3 145.59 234.2
This is frame mode for variable bitrate mp3 and multiple files. You can see that time format uses min.sec even if minutes are over 60. Output files in this case will be: album_145m_59s_0h__234m_2s_0h.mp3 and album2_145m_59s_0h__234m_2s_0h.mp3 because user didn't specify it and they will be in the directory named newdir.
mp3splt -nf album.mp3 0.12 21.34.7 25.3 30.40 38.58
This is the use of -n option and multiple splitpoints. Four files will be created and will not contain ID3 informations.
mp3splt -w album_MP3WRAP.mp3
This is Wrap mode. You can use this when mp3 is a file wrapped with Mp3Wrap or AlbumWrap. You can specify an output directory with the -d option.
mp3splt -lq album.mp3
This is List mode. You can use this when you want to list all tracks of a wrapped file without extracting them. With quiet option (-q), program will not calculate CRC!
mp3splt -s f.mp3 or mp3splt -s -p th=-50,nt=10 f.mp3
This is silence option. Mp3splt will try to automatically detect splitpoints with silence detection and in the first case will split all tracks found with default parameters, while in the second 10 tracks (or less if too much) with the most probable silence points at a threshold of -50 dB.
mp3splt -c file.cddb album.mp3
This is CDDB mode with a local file. Filenames and splitpoints will be taken from file.cddb.
mp3splt -c query album.mp3
This is CDDB mode with internet query. Will ask you the keyword to search and you will select the wanted cd.
mp3splt -a -c file.cddb album.mp3
This is CDDB mode with auto-adjust option (default parameters). Splitpoints will be adjusted with silence detection in a range of 30 seconds before and after cddb splitpoints.
mp3splt -a -p gap=15,th=-23,rm -c file.cddb album.mp3
This is CDDB mode with auto-adjust option. Splitpoints will be adjusted with silence detection in a range of 15 seconds before and after cddb splitpoints, with a threshold of -23 dB, and silence will be removed.
mp3splt -c query album.mp3 -n -o @n_@t
This is CDDB mode with internet query with Frame mode, NoID3 and Output format. Output filenames will be named like: 01_Title.mp3
mp3splt -t 10.00 album.mp3
This is -t option. It will split album.mp3 in many files of 10 minutes each.
Report any bugs you find to Authors (see below). Advices, info requests and contributions are welcome.
mp3wrap(1)
Matteo Trotta <mtrotta@users.sourceforge.net>
Alexandru Ionut Munteanu <io_fx@yahoo.fr>
Visit http://mp3splt.sourceforge.net for latest release.
mp3splt-project is
(C) 2002-2005 by Matteo Trotta
(C) 2005-2009 by Alexandru Ionut Munteanu
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. This can be found as COPYING in mp3splt packages.