MP3SPLT(1)
๐ MP3SPLT(1) ๐
general commands manual, but make it cute โ this is the page for mp3splt, and its two ride-or-die siblings oggsplt and flacsplt. Same energy, same tool, different file flavor. ๐
โจ NAME โจ
mp3splt, oggsplt, flacsplt โ a utility for mp3, ogg vorbis and native flac splitting without decoding. no decode, no re-encode, just vibes. ๐ฆ
๐ SYNOPSIS ๐
mp3splt [OPTIONS] FILE_OR_DIR1 [FILE_OR_DIR2] ... [BEGIN_TIME] [TIME2] ... [END_TIME]
FILE_OR_DIR: an mp3, ogg vorbis or native flac file you wanna split, or a directory. bestie, if you wanna feed it STDIN, you use "m-" (or "-") when the input is mp3, and "o-" when it's ogg. ๐ซถ
You can throw in multiple files and all of them get split with the same criterion. And if you hand it a directory, it does a recursive scan in there to sniff out every supported file format it can find. โจ
๐ธ TIME FORMAT ๐ธ
minutes.seconds[.hundredths] or EOF-minutes.seconds[.hundredths]
- Minutes (required) โ there is no limit to minutes. yes you read that right. (and you must use this format for minutes over 59 too, no switching it up)
- Seconds (required) โ must be between 0 and 59.
- Hundredths (optional) โ must be between 0 and 99. use these when you want higher precision, iykyk. ๐ฅ
You can specify multiple split points. After the minimal 2, you can keep adding an indefinite number of split points. Each split point becomes the end time for the previous one and the begin for the next one. And if you wanna reach the end of the file, just use "EOF" as the last splitpoint. ๐
heads up: EOF-minutes.seconds[.hundredths] only works when the input is seekable. no cap.
๐ DESCRIPTION ๐
mp3splt is a free command-line utility that lets you split mp3, ogg vorbis and native flac files from several splitpoints, without needing to decode and reencode. it's giving efficiency. it's giving iconic. ๐
It's useful for splitting large mp3, ogg vorbis and native flac files into smaller ones, or for splitting whole albums so you get the original tracks back. ๐
If you're splitting an album, you can get splitpoints and filenames automatically from internet servers like freedb.org, tracktype.org, or from a local .XMCD (.CDDB) or .CUE file (peep the -c option). And you can auto-adjust them with silence detection (peep -a). ๐
You can also:
- try to split files automatically with silence detection (
-s) - trim files using silence detection (
-r) - or split by a fixed time length (
-t)
Or, if you've got a file made with either Mp3Wrap or AlbumWrap, you can split it easy-peasy with just one command (-w). โจ
โ ๏ธ IMPORTANT NOTE for FLAC: FLAC support is still experimental. please use with caution, bestie. The missing FLAC features are stdin (input not seekable) and stdout. ๐ญ
NOTE for MP3: usuallymp3spltunderstands if an mp3 is VBR by checking for a Xing or Info header, and will consequently start in framemode. But if that's not present,mp3spltstarts in standard mode. That means the splitting process is quicker but imprecise because of the variable bitrate. So you can only split those VBR files with framemode (see-f). ๐
NOTE for OGG: in some cases, mp3splt does not manage to split ogg vorbis streams correctly. Splitting the input file from 0.0 to EOF might fix the issues. ๐
NOTES about TAGS: by default, mp3splt puts the original tags in the split files, with one exception: the track number starts at 1 and gets incremented along the split files. When copying the original file tags, only one artist, album, and title are supported. Custom tags for the split files can be set with the -g option. Setting exactly the same tags as the original file is possible with -g %[@O] (mp3 only) or -g %[@o]. ๐
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; this behaviour can be changed with the -T option. If the input file has no tags and the -g option is used, then both ID3v1 and ID3v2 are written. Total tracknumber is not yet supported. Only writing ID3v2.4 is supported for custom tags โ and note that some software only supports ID3v2.3 and won't be able to read them. ๐ญ However, it is possible to write the exact original tags using %[@O], keeping the same tags version as in the original file. โจ
NOTE about the OUTPUT DIRECTORY: by default, mp3splt puts the split files in the directory of the input file. To change the output directory, you can use one of these options: -d or -o. Please note that directories from the -o option will be created relative to the input file directory. ๐ซถ
๐ OPTIONS ๐
-wโ Wrap Mode. Use this to split a file created with:- Mp3Wrap http://mp3wrap.sourceforge.net: this tool joins two or more mp3 files into one large playable file that usually contains the string
MP3WRAPin the filename and a special comment in ID3v2. If the file you're splitting is a Mp3Wrap file, the splitting process will be very fast and you'll get all the files with just one command. If your filename containsMP3WRAPand you get errors, or you just don't wanna use wrap mode, just remove it from the file. ๐ - AlbumWrap:
mp3spltis compatible with albumwrap files too, which usually contain the stringALBWin the filename, and their ID3v2 containsAlbumWrap. But โ as with the AlbumWrap extractor โmp3spltgives no warranty. ๐
- Mp3Wrap http://mp3wrap.sourceforge.net: this tool joins two or more mp3 files into one large playable file that usually contains the string
-lโ List mode (only for Wrap mode). Lists all tracks wrapped in a Mp3Wrap or AlbumWrap archive, without any extraction. Use this to view the content of the file, or to test whether the file is a valid wrapped file. ๐-eโ Error mode (mp3 only). Useful for splitting a large file derived from a concatenation of smaller files. It detects split points from the so-called "sync errors" (data that breaks the stream, such as ID3 or junk data). Examples of applicable files are wrapped files (both AlbumWrap and Mp3Wrap) or files created by appending many mp3 files together. So, when you have a file to split, you should always try to use this option. โจ-AAUDACITY_FILEโ Audacity labels mode. Split with splitpoints from the audacity labels file. Example of an audacity labels file (in seconds):
10.000000 67.000000 first_file
67.000000 127.000000 second_file
149.000000 206.000000 third_file
-tTIME[>MIN_TIME]โ Time mode. This option creates an indefinite number of smaller files with a fixed time length specified byTIME(which has the same format described above). It's useful to split long files into smaller ones (for example, with the time length of a CD). The adjust option (-a) can be used to adjust splitpoints with silence detection.>MIN_TIMEcan be used to specify the theoretical minimum track length of the last segment; it lets you avoid creating very small files as the last segment. Make sure to quote the argument when usingMIN_TIMEโ"TIME>MIN_TIME". ๐-SSPLIT_NUMBERโ Equal time tracks mode. Split intoSPLIT_NUMBERfiles. โญ-rโ Trim using silence detection. To trim using silence detection we need to decode files, so this option can be really slow if used with big files. ๐ญ It accepts some parameters with the-poption (see below for a detailed description): threshold level (th), which is the sound level to be considered silence, and min (min), which is the minimum silence length to trigger a trimming; this amount of silence will be kept in the split file at the beginning and at the end.-sโ Silence mode, to split with silence detection. When you use the-soption,mp3spltattempts to detect silence points in all the file (or just in some parts โ see-aand-cbelow for that). To detect silence we need to decode files, so this option can be really slow if used with big files. ๐ญ It accepts some parameters with the-poption (see below for a detailed description):- threshold level (
th) โ the sound level to be considered silence - number of tracks (
nt) โ the desired number of tracks - cutpoint offset (
off) โ the offset of the cutpoint in silence - minimum_length (
min) โ the minimum silence length in seconds - remove silence (
rm) โ lets you remove the silence between split tracks
- threshold level (
If you don't specify any parameter, mp3splt will use the default values. Of course, if you specify the number of tracks to split, you'll help mp3splt understand what the most probable split points are. Anyway, once you scan a file with the -s option, mp3splt writes a file named "mp3splt.log" in which it saves all silence points found. ๐ฆ
If this file exists in the current working directory, mp3splt will read the splitpoints from this file and will not recompute the silence splitpoints. This lets you run mp3splt with different parameters (except th and min) without decoding the file again. ๐ฅ
Finally, if the number of silence points isn't correct, you have many chances to achieve the right result. For example, if a silence point wasn't detected because it was too short, you can manually split the long track into the two smaller ones. Or if the file is an MP3 (not with ogg) and there are too many silence points that can't be discarded by reducing the track number (because they're longer than the right points), you can safely concatenate them with 'cat' programs or similar ('copy /b file1+file2' for dos), because split files are consecutive โ no data is lost. ๐
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. Trying to split mixed albums or files with consecutive tracks (such as live performances) might be only a waste of time. ๐
๐ 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 order of magnitude of the silence length; it's useful to find out the most probable silence points โจ
- the first column is the start position of the found silence (in
-c SOURCEโ the CDDB mode, bestie. ๐ This one grabs your splitpoints AND your filenames automatically fromSOURCE. It's giving "let the internet do your homework" and honestly? Slay.
So SOURCE can be the name of a .CUE file โ and yes, it must end with .cue, because if it doesn't, mp3splt will lowkey misread it as a cddb file and everything goes sideways ๐ โ or it can be a local .XMCD (.CDDB) file chillin' on your hard disk.
And if you wanna split using internal sheets, then SOURCE has to be internal_sheet. Right now there are exactly two internal sheets supported: the internal CUE sheet of native FLAC files, and ID3v2 chapters for MP3 files (heads up: there's a limitation on ID3v2 chapters for overlapped chapters, so don't come for me).
Now if you want the informations from the Internet, SOURCE has to be one of these 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 you put a string between { and }, then the internet search happens on that string and nobody's gonna ask you to type a search string interactively. Iconic. โจ And the number between ( and ) is for auto-selecting result number ALBUM_RESULT_NUMBER, so the user won't be asked to interactively input a result number either.
The other parameters between [ and ] are for specifying the protocols and the sites. If you don't specify them, default values get chosen, and ngl those defaults are good enough in most cases. Inside the square brackets, search defines the CDDB search protocol and site (that's for searching the disc ID from the album and title); get defines the CDDB download protocol and site (that's 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, fr fr:
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 finding 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, and from that it gets splitpoints and filenames. Cute, right? ๐
Proxy support: the first time you query the internet (and if quiet mode isn't enabled), mp3splt asks for some info about proxy usage. Mp3splt has basic authentification support using base64 for HTTP proxies. A file named .mp3splt gets created in your user home directory containing the informations you provided. Delete that file and mp3splt will query you all over again. Please note that the authentification storage is not secure โ the username:password is stored as base64 and can be easily decoded. So like, don't put your whole life in there. ๐
๐จ IMPORTANT NOTE FOR CDDB ๐จ โ file split with this option can be not very precise, due to:
- Whoever extracts CD tracks may use the "Remove silence" option. This means the large file is shorter than CD Total time. Never use this option.
- Whoever burns CD may add extra pause seconds between tracks. Never do it.
- Encoders may add some padding frames so that the file is longer than CD.
- There are several entries of the same cd on CDDB. In mp3splt they appear with the
"\=>"symbol. Try some of them and find the best for yours; usually you can find the correct splitpoints, so good luck! ๐
YOU CAN USE THE -a OPTION TO ADJUST SPLITPOINTS! Like, capital letters, bestie. That's how serious this is.
-aโ auto-adjust mode, the glow-up for your splitpoints. ๐ธ This one uses silence detection to auto-adjust splitpoints. It works in standard mode, or with-tand-c(of course, if there's silence in the file ;)). It accepts some parameters with the-poption (detailed description further down, keep scrolling ๐): threshold level (th) which is the sound level considered silence, cutpoint offset (off) which is the offset of cutpoint in silence,min(min) which is the minimum silence length in seconds, andgap(gap) which is the gap value around the splitpoint to search for silence. If you don't specify any parameter, mp3splt uses the default values. With-athe splitting process is the same, but for each splitpoint mp3splt will decode some time (gap) before and some after to find silence and adjust splitpoints.-p PARAMETERSโ the parameters for the-a,-sand-roptions. When you're using-a,-sand-r, some user parameters can be specified in the argument, and they must be in the form:
<name1=value,name2=value,..>
You can specify an indefinite number of them, with no spaces, separated by comma. Available parameters are:
โจ For -s, -a and -r โจ
th=FLOATโ threshold level (dB) to be considered silence. It's a float number between-96and0. Default is-48dB, which is a value found by tests and should be good in most cases. Trust the tests. ๐ซถshots=INTEGERโ a positive integer of the minimum number of shots to be found as non-silence after the silence. Default is25. Decrease this value if you need to split files having closer silence points.min=FLOATโ a positive float of the minimum number of seconds to be considered as valid silence. All silences shorter thanminare discarded. Default is0. For the trim silence split, it is the minimum silence length to trigger a trimming; this amount of silence will be kept in the split file at the beginning and at the end.
โจ Both -s and -a โจ
off=FLOATโ a float number between-2and2that lets you adjust the offset of cutpoint in silence time.0is the begin of silence, and1the end. Default is0.8. In most cases you'll only need a value between0and1.
Offset visualization, because a picture is worth a thousand flags:
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).
โจ Only -s โจ
nt=INTEGERโ a positive integer number of tracks to be split when using the-soption. By default all tracks are split.rm[=FLOAT_FLOAT]โ used to remove silence when using the-soption. Can be used without additional numbers โ by default it will cut all the silence found. Users can keep some of the silence found by passing the number of seconds to be kept at the beginning of the output files and at the end of the output files. For example,rm=2_6will keep 2 seconds of silence at the beginning of the split files and 6 seconds at the end. If the silence length is less than the sum of the number of seconds passed to thermparameter, the split will convert the values to a percentage of the silence length. Taking the previous example, if the silence length is less than 8 seconds, the split will be done at 75% of the silence segment starting from the beginning of the silence (75% = 6/(2+6)). Math ate, honestly. ๐งฎtrackmin=FLOATโ a positive float of the minimum number of seconds for a track to be written out. Tracks shorter thantrackminwill be skipped during the output phase. The default value0.0means to not skip any tracks.trackjoin=FLOATโ a positive float of the minimum number of seconds for a track to be written out. Tracks shorter thantrackjoinwill be joined with others. The main difference between this parameter andtrackminis that using this one, no part of the original file will be lost. The default value of0.0means to not join any tracks. If using bothtrackminandtrackjoin, tracks shorter thantrackminwill be discarded, but after the join.
โจ Only -a โจ
gap=INTEGERโ a positive integer for the time to decode before and after splitpoint. Increase it if splitpoints are completely wrong, or decrease it if they're wrong for only a few seconds. Of course the smaller the gap, the faster the process. Default gap is30seconds (so for each song, total decode time is one minute).warn_if_no_aaโ print a warning for each splitpoint if it has not been auto-adjusted.error_if_no_aaโ stop the split process with error if one of the splitpoints has not been auto-adjusted. No chill, just error. ๐ค-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 (VBR) 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. Frame mode will print extra info on split process, such as sync errors. If you obtain some sync errors, try also to split with the-eoption.-bโ [Experimental] bestie this is the bit reservoir handling for gapless playback, and it'smp3only, okay? It handles bit reservoir issues when you're splitting mp3 files. It also lets playback happen at the exact sample specified by the input time, instead of the music data boundaries. Warning: split files will play gapless only on players that support mp3 gapless playback using the LAME tag delay and padding values (examples of gapless mp3 players:cmus,mpg123,foobar2000). This feature is heavily inspired bypcutmp3developed by Sebastian Gesemann. Use with caution because it is still an experimental feature. ๐งช-kโ input not seekable, periodt. Consider input not seekable (this is the default when usingSTDINas input). This lets you split mp3 streams which can be read only one time and can't be seeked. Both framemode and standard mode are available, but framemode can be really slow if used with big files, because to seek splitpoints we need to process all bytes and all frames. Heads up: the-koption (soSTDINas input too) can't be used together with-s-a-w-e, because input must be seekable for those options. Copying original tags is not yet supported for the non seekable option. ๐ญ-Mโ write MD5 sum, and this one isFLAConly. Using this option, the frames are decoded just before being written in the output files and the MD5 sum of the unencoded data is computed in order to complete theSTREAMINFOmetadata block of the created files. It's disabled by default because the decoding process makes the split be much slower (it can be twice slower). However, even when using this option, the process remains faster compared to splitting by decoding and then re-encoding. ๐-O TIMEโ overlap split files.TIMEwill be added to each end splitpoint. Current implementation of this option makes the split slower.-o FORMATโ output format, the moment you've all been waiting for.FORMATis a string that will be used as output directory and/or filename. IfFORMATcontains theDIRCHARcharacter ('\'on windows and'/'on other systems), directories will be created for eachDIRCHARif they don't exist and the output files will be created in the corresponding directory. If the-doption is not specified, the output directory is the concatenation of the input file directory and the extracted path fromFORMAT. If the-doption is also specified, the output directory will be the concatenation between the-doption value and the extracted path from the-o FORMAT(characters up to the lastDIRCHAR). Invalid filename characters from the tags are transformed to'_'.
It can contain name variables, that must begin with @ char and that can be:
@A: performer if found, otherwise artist@a: artist name@p: performer of each song (only with.cue)@b: album title@g: genre@t: song title*@n: track number identifier* (not the real ID3 track number)**@N: track tag number**@l: track number identifier as lowercase letter* (not the real ID3 track number)**@L: track tag number as lowercase letter**@u: track number identifier as uppercase letter* (not the real ID3 track number)**@U: track tag number as uppercase letter**@f: input filename (without extension)@d: last directory of the input filename or the filename itself if no directory@m,@sor@h: the number of minutes, seconds or hundreths of seconds of the start splitpoint**@M,@Sor@H: the number of minutes, seconds or hundreths of seconds of the end splitpoint**
(**) One digit may follow defining the number of digits to output.
If the digit is 0, then a special rule is applied when the pattern value is equal to 0:
- the pattern is discarded
- all characters like
:_.and-.preceding it are discarded - all characters following it are discarded up to the next
@or a separator like:_.and-
This rule is useful for discarding the last part of the time when equal to 0. For example @m_@s_@h0hundreths__@M_@S will only output @m_@s__@M_@S if the hundreths of seconds are 0. โจ
When split files are more than one, at least one of @t, @n, @N, @l, @L, @u or @U (*) 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>')
@f_@n+@m:@s+@M:@S
-d NAMEโ output directory. To put all output files in the directory namedNAME. If directory does not exists, it will be created. The-ooption can also be used to output files into a directory.-nโ no tags, no thoughts, just clean files. Does not write ID3 or Vorbis comment in output files. Use if you need clean files. See also the-xoption. ๐งผ-xโ no Xing header. Does not write the Xing header in output files. Use this option with-nif you wish to concatenate the split files and obtain a similar file as the input file.-T TAGS_VERSIONโ force output tags version. For mp3 files, force output ID3 tags as version ID3v1, ID3v2 or ID3v1 and ID3v2.TAGS_VERSIONcan be1,2or12. Default is to set the output tags version as the tags version of the input file.-C ID3V2_TEXT_ENCODINGโ set encoding of the ID3V2 tags. For mp3 files, set the encoding of ID3V2 tags.ID3V2_TEXT_ENCODINGcan be1for latin1 (iso-8859-1),8for UTF-8 or16for UTF-16. Default is UTF-16.-I INPUT_TAGS_ENCODING_FOR_ID3V2โ set encoding of the input tags for mp3 files.INPUT_TAGS_ENCODING_FOR_ID3V2can be1for latin1 (iso-8859-1),8for UTF-8 or16for UTF-16. Default is UTF-8.-Nโ no silence log file. Don't create the'mp3splt.log'log file when using silence detection. This option cannot be used without the'-s'option.-Kโ keep original tags for CDDB or CUE. When importing a CDDB or CUE file, set the original input file tags and then replace them with those read from the imported file.-g TAGSโ custom tags, and bestie this one is a whole journey, buckle up. Set custom tags to the split files. If you want to set spaces in tags, you might need to double quote the wholeTAGS.TAGSshould contain a list of square brackets pairs[]. The tags defined in the first pair of square brackets will be set on the first split file, those defined in the second pair of square brackets will be set on the second split file, ... Inside a pair of square brackets, each tag is defined as@variable=valueand tags are separated by comma. If a percent sign%is found before the open square bracket character, then the pair of square brackets following the%character will define the default tags in the following files. Multiple'%'can be defined. An optional'r'character can be placed at the start, to replace tags in tags. The'replace tags in tags'option is not recursive. The variables can be:@a: artist name@b: album title@t: audio title@y: year@c: comment@g: genre@n: track number (set to-2for none)@o: set original tags@O: set exactly the same original tag bytes and discard other variables (mp3 only)@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@m,@sor@h: the number of minutes, seconds or hundreths of seconds of the start splitpoint@M,@Sor@H: the number of minutes, seconds or hundreths of seconds of the end splitpoint
Using the 'replace tags in tags' option, you can also use the following variables, which are replaced by the data from the original tags: #a, #b, #t, #y, #c, #g. Note that this will only work if @o has been found before. ๐
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.
Example of replacing tags in tags:
r%[@o,@N=1,@b=album,@a=artist_@b_@N]
Having the 'r' option, the replace tags in tags mode is activated; thus, output artists are 'artist_album_1', 'artist_album_2', ... Without the 'r' option, output artists are 'artist_@b_@N'.
Replacement is not recursive:
r%[@o,@N=1,@b=album_@N,@a=artist_@b]
will output albums as 'album_1', 'album_2', ... but artists as 'artist_album_@N'.
Example of replacing tags in tags with # variables:
r%[@o,@N=1,@t=@N_#t]
This will prepend the auto incremented track number to the original input file title; supposing that the input file title is 'one_title', this will set the titles as follows: '1_one_title', '2_one_title', ... ๐ธ
-G regex=REGEXโ tags from filename regex. Set tags from input filename regular expression.REGEXcan contain those variables:(?<artist>),(?<album>),(?<title>),(?<tracknum>),(?<year>),(?<comment>),(?<genre>)๐ฆ
Okay so picture this: your input filename is artist1__album2__title3__comment4__2__2004__Samba.ogg โ iconic name, right? Then this regular expression:
(?<artist>.*?)__(?<album>.*?)__(?<title>.*?)__(?<comment>.*?)__(?<tracknum>.*?)__(?<year>.*?)__(?<genre>.*)
extracts the tags like a boss:
(?<artist>):artist1(?<album>):album2(?<title>):title3(?<genre>):Samba(?<comment>):comment4(?<tracknum>):2(?<year>):2004
Now onto the rest of the options, bestie:
-m M3Uโ Create.m3ufile. Creates a.m3ufile containing the split files. The generated.m3ufile only contains the split filenames without the path. If an output directory is specified with-dor-o, the file is created in this directory. The path of M3U is ignored. This option cannot be used with STDOUT output. ๐-E CUE_FILEโ Export to.cuefile. Creates a.cuefile containing the splitpoints. Use-Pto export the splitpoints without actually splitting. The cue file contains the tags of the splitpoints as comments (for exampleREM ALBUM,REM GENRE,REM DATE). There is however one limitation:REM TRACKis not written if the track was auto incremented without user defined tags. โ ๏ธ-F FULL_SILENCE_LOG_FILEโ Export the full log of silence detection. The full log filename is useful to draw the amplitude wave of the input file (in dB) in order to choose a threshold.
Note about the file structure:
- the first column is a dummy column which is always zero, for plotting on zero axis purposes
- the second column is the time in seconds as double
- the third column is the dB level
- the fourth column is the silences shots counter
- the five column is the number of splitpoints found
- the sixth column is the start time of the silence spot found
- the seventh column is the end time of the silence spot found
Example of plotting the full log file with gnuplot:
gnuplot -e "file='silence_logs.txt'; set decimalsign locale; set xlabel 'Time in seconds'; plot file using 2:3 title 'Threshold', file using 2:4 title 'Silence shots' with linespoints, file using 2:5 title 'Number of silence points found' with fsteps, file using 6:1 title 'Begin of silence', file using 7:1 title 'End of silence' with points; pause -1"
-Pโ Pretend to split. Simulation of the process without creating any files or directories. โจ-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. ๐คซ-Qโ Very quiet mode. Enables the-qoption and does not print anything to STDOUT. This option cannot be used with STDOUT output. ๐ค-Dโ Debug mode. Experimental debug support. Print extra informations about what is being done. Current print doesn't have a nice format. ๐-vโ Print version. Print the version of mp3splt and libmp3splt and exit. ๐ฆ-hโ Print help. Print a short usage of mp3splt and exit. โ
๐ซ EXAMPLES ๐ซ
- ```bash 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. <rainbow>โจ</rainbow>
2. ```bash
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.
- ```bash 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.
4. ```bash
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.
- ```bash 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!
6. ```bash
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.
- ```bash mp3splt -c file.cddb album.mp3
This is CDDB mode with a local file. Filenames and splitpoints will be taken from `file.cddb`.
8. ```bash
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.
- ```bash 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.
10. ```bash
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.
- ```bash 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`
12. ```bash
mp3splt -t 10.00 album.mp3
This is -t option. It will split album.mp3 in many files of 10 minutes each.
๐ BUGS ๐
Report any bugs you find to authors (see below). Advices, support requests and contributions are welcome. ๐
๐ SEE ALSO ๐
๐ AUTHORS ๐
Matteo Trotta <mtrotta@users.sourceforge.net> Alexandru Ionut Munteanu <m@ioalex.net>
๐ฆ DISTRIBUTION ๐ฆ
Visit http://mp3splt.sourceforge.net for latest release.
mp3splt-project is
(C) 2002-2005 by Matteo Trotta (C) 2005-2014 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.
That's the whole manual page, bestie ๐
โ MP3SPLT(1) is the footer, no date attached, but it's giving timeless Unix manual energy. Stay slaying, and remember: keep every flag exactly as written, no cap. ๐ฆโจ
๐ฆ where this page comes from
- alpine 3.24: mp3splt-doc 2.6.2-r1 ยท GPL-2.0-or-later
- debian bookworm: mp3splt 2.6.2+20170630-3.1+b1
- debian trixie: mp3splt 2.6.2+20170630-3.3+b1
- ubuntu jammy: mp3splt 2.6.2+20170630-3.1
- ubuntu noble: mp3splt 2.6.2+20170630-3.2build5
- ubuntu questing: mp3splt 2.6.2+20170630-3.3build1
- ubuntu resolute: mp3splt 2.6.2+20170630-3.5 ยท GPL-2.0-or-later
- ubuntu stonking: mp3splt 2.6.2+20170630-3.5 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms