MP3SPLT

Section: Misc. Reference Manual Pages (1)

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
BUGS
SEE ALSO
AUTHOR
DISTRIBUTION
 

NAME

mp3splt --- Utility for mp3 and ogg split without decoding  

SYNOPSIS

mp3splt FILE begin_time end_time... [outputfile]

mp3splt -w FILE

mp3splt -e FILE

mp3splt -s THRESHOLD FILE [TRACKNUMBER]

mp3splt -t TIME FILE

mp3splt -c SOURCE FILE [-o FORMAT] [-a ADJUST]

TIME FORMAT: begin_time and end_time must be in this form:

minutes.seconds[.hundreds]

minutes (required): There is no limit to minutes. (You must use this format also for minutes over 59)
seconds (required): Must be between 0 and 59.
hundreds (optional): Must be between 0 and 99. Use hundreds of seconds for higher precision.

Multiple split points can be specified. After the minimal 2, another indefinite number of split points (up to 100) can be specified. Each split point will be an end time for the previous, and a begin for the following. An invalid time format (and the next ones) will be ignored. Instead, if the 3rd split point is invalid, will be considered as output filename!

outputfile: can be specified only if you do not use multiple splitpoints (one file at time). If not specified or if you use multiple splitpoints, mp3splt will create an outputfile in the form: FILE_begintime_endtime.mp3. If filename is "-", output will be standard out (stdout);

source: file.cddb, file.cue or "query".

tracknumber (optional): integer number of tracks to be splitted.

threshold: float number between 0 and 10 or "auto". In quadratic scale, stands for threshold silence level in -s option (auto is 0.58).

adjust: this is the argument of -a option with parameters or "auto" (see below for details)

format: string to format output filename (see -o)

 

DESCRIPTION

mp3splt is a free command-line utility that allows to split mp3 and ogg files from a begin time to an end time, without need of decoding and reencoding. It's useful to split large mp3/ogg to make smaller files or to split entire albums to obtain original tracks. Note that mp3splt will recognize an ogg file instead of mp3 only from extension. So if your file is Ogg Vorbis, it must end with ".ogg"

If you are splitting an album, you can select split points and filenames manually or you can get them automatically from CDDB (internet or a local file) or from a .cue file. (See -c option)

You can also try to split files automatically with silence detection (See -s option)

Or if you have a file created either with Mp3Wrap or AlbumWrap, you can easily split it just with -w option and no further arguments.

NOTE (not for -w mode): When you launch program without -f option, mp3splt will start in standard mode. This means that splitting process will be very quick, but you CAN'T SPLIT VARIABLE BITRATE MP3. VBR mp3 can be splitted only in frame mode with -f option (see below).  

OPTIONS

-w
Wrap Mode. Use to split file created with:

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 filename.

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.

-l
List mode (Only for Wrap mode). Lists all tracks wrapped in a Mp3Wrap or AlbumWrap archive without any extraction. Use this to view only the content of the file or to test if file is a valid wrapped file.

-e
Error mode (mp3 only). It is useful to split large file derivated from a concatenation of smaller files. It detects split points from so called "sync errors" (data that break stream, such as ID3 or junk data). Examples of applicable files are wrapped file (both AlbumWrap and Mp3Wrap) or file created by appending many mp3 files together. So, when you have a file to split, you should always try this option to make sure file is not a damaged wrapped file or any generic concatenated file.

-t TIME
Time mode. this option will create an indefinite number of smaller files with a fixed time length specified by TIME (which has the same format described above). It is useful to split long files into smaller with for example the time of a cd. Adjust option (-a) can be used to adjust splitpoints with silence detection.

-s THRESHOLD
Silence mode. to split with silence detection. When you use -s option, mp3splt attempts to find splitpoints detecting silence points on all file or can be used with -c option (see -a and -c below). To detect silence we need to decode files, so this option can be really slow if used with big files. Threshold is the sound level which should be considered silence, it's a float number between 0 and 10. If you write "auto" instead of a number, a value of 0.58 will be used, which is a value found by test and should be good in most cases. After filename you can specify an integer NUMBER to indicate the desired number of tracks, else all found tracks will be splitted. Of course if you specify a NUMBER you will help mp3splt to understand what are the most probable split points, anyway once you scan a file with -s option, mp3splt will write a file named "mp3splt.log" in which it saves all silence points found. This allows you to run mp3splt with a different (or right) number of tracks without need of decoding file again. Finally, if the number of silence points is not correct, you have many chances to achieve right result. For example if a silence point was not detected because too short, you can manually split the long track in the two smaller ones. Or if file is an MP3 (not with ogg) and there are too many silence points that can't be discarded reducing track number (because are longer than right points) you can safely concatenate them with 'cat' programs or similar ('copy /b file1+file2' for dos) because splitted files are consecutive, no data is lost and no ID3 is written for this purpose. This option is intended to split small/medium size (but even large if you can wait ;) mp3 and ogg files where tracks are separated by a reasonable silence time. Don't try to split mixed albums or files with consecutive tracks (such as live performances), it will be only a waste of time.

-c SOURCE
CDDB mode. To get splitpoints and filenames automatically from SOURCE, that is the name of a ".cue" file (note that it must end with ".cue" or ".CUE", otherwise it will be wrongly interpreted as a cddb file) or a local cddb file on your hard disk. If you want to get informations from Internet, just type "query" instead of filename. mp3splt will connect to server, will ask you some keywords and will start to find the requested informations. If you will find the right album, then mp3splt will finally query the server to get the selected album and, if all is correct, will write a file named "query.cddb" from which will get splitpoints and filenames. ID3v1 will be created automatically with taken informations. The first time you run mp3splt with "query" option, it will ask you if you use a proxy, just fill out informations.

IMPORTANT NOTE FOR CDDB: File splitted with this option might 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 for your mp3, so good luck!

YOU CAN USE -a OPTION TO ADJUST SPLITPOINTS! (see below)

-a <name1=value,name2=value,...>
Auto-adjust mode. This option uses silence option to auto-adjust splitpoints. It can be used in standard mode, or with -t and -c option (of course if there is silence in the file ;). Process is the same, but for each splitpoint mp3splt will decode some time (gap) before and some after to find silence and adjust splitpoints. In the argument you can specify the desired parameters, with no spaces and separated by comma, or just "auto", which will set all parameters to default values. Available parameters are:

gap=INTEGER: it is a positive integer for the time to decode before and after splitpoint, increase if splitpoints are completely wrong, or decrease if wrong for only few seconds. Of course the smaller the gap, the faster the process. If not specifed default gap is 30 seconds (so for each song, total decode time is one minute).

th=FLOAT: it is the threshold level to be considered silence. It is a float number between 0 and 10. If not specifed default threshold is 0.58.

-f
Frame mode (mp3 only). Process all frames, seeking split positions by counting frames and not with bitrate guessing. In this mode you have higher precision and you can split variable bitrate mp3. (You can also split costant bitrate mp3, but it will take more time). Note also that "high" precision means that time seeking is reliable, but may not coincide for example with another player program that uses time seeking with bitrate guessing. So make your choice as you need. Frame mode will print extra info on split process, such as sync errors. If you obtain some sync errors, try also to split with -e option.

-o FORMAT
Output format. to have a personal output filename with -c option. FORMAT is a string that will be used as output filename. It should contain name variables, that must begin with @ char and that can be:

@a: artist name
@b: album title
@t: song title*
@n: track number*
@p: performer of each song (only with .cue)

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 to 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 -o not specified)

-d NAME
Output directory. To put all output files in the directory named NAME. If directory does not exists, it will be created.

-n
No Tag. Does not write ID3 or Vorbis comment in outputfile. Use if you need clean files.

-q
Quiet mode. Stays quiet :) i.e. do not prompt the user for anything and print less messages. When you use quiet option, mp3splt will try to end program without asking anything to the user (useful for scripts). In Wrap mode it will also skip CRC check, use if you are in such a hurry.
 

EXAMPLES

mp3splt album.mp3 54.32.19 67.32 out.mp3
mp3splt album.ogg 54.32.19 67.32 out.ogg

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 hundreds, 54.32.19), an end time and an output file.

mp3splt -f -d newdir album.mp3 145.59 234.2

This is frame mode for variable bitrate mp3. You can see that time format uses min.sec even if minutes are over 60. Output file in this case will be: album_145.59_234.2.mp3 because user didn't specify it and will be all 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 that 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 have not to specify further arguments because all will be automatic.

mp3splt -wlq album_MP3WRAP.mp3 or just mp3splt -lq album_MP3WRAP.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 auto album.mp3 or mp3splt -s 1.45 album.mp3 10

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 threshold, while in the second 10 tracks (or less if too much) with the most probable silence points at a threshold of 1.45.

mp3splt -c file.cddb album.mp3

This is CDDB mode with a local file. Filenames and splitpoints will be taken from file.

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 auto -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 gap=15,th=0.82 -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 0.82.

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 file of 10 minutes each.

 

BUGS

Report any bugs you find to Author (see below). Advices and info requests are welcome.  

SEE ALSO

mp3wrap(1)  

AUTHOR

Matteo Trotta <mtrotta@users.sourceforge.net>.  

DISTRIBUTION

Visit http://mp3splt.sourceforge.net for latest release.

mp3splt is (C) 2002-2003 by Matteo Trotta

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 directory.

Index


This document was created by man2html, using the manual pages.
Time: 12:34:33 GMT, Aug 8, 2003