Bash shell script/wrapper for transcoding and processing music files with a strong focus on the MP3 format.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

654 lines
31 KiB

#
## CONFIGURATION FILE FOR MP3 FACTORY
# ------------------------------------------------------------------------------
#
# FOR IMPORTANT INFORMATION REGARDING THIS FILE:
#
# MP3 Factory: 'De-borking' MP3s on Linux
# https://12bytes.org/projects/de-borking-mp3s-on-linux/
#
# There are 3 types of option-value pairs: array, integer and string. All string
# values must be contained in single quotes. All values for array options must
# be quoted (usually single quotes), separated with a single space, and the
# entire value must be enclosed in parenthesis. All integer values must not be
# quoted. Floating point numbers (1.2) are not allowed unless otherwise noted.
# Following are examples of each properly formatted option-value type:
#
# aArray=( 'value 1' 'value 2' '...' )
# iInteger=1
# sString='value'
#
# Do not edit, move or remove lines beginning with '# default value:' as they
# are used to reset all values to their defaults.
#
# Rather than editing these options it is suggested to make a copy of this file
# and edit the copy. Be sure to give the new file a descriptive name and a
# '.conf' extension. *BE VERY CAREFUL* to not mess up the syntax else bad things
# could happen since this file is essentially part of the mp3factory.sh script.
# It is highly recommended to install the 'shellcheck' package which MP3 Factory
# will then use to check the syntax of your active configuration file. Failing
# that, check the syntax on-line each time you make a change (you can ignore all
# the "... appears unused ..." warnings):
# https://www.shellcheck.net/
#
# Options which novice users should avoid altering are preceded with '(!)'.
#
# To reset all options to their default values run: ./mp3factory.sh -r
#
# ------------------------------------------------------------------------------
## GLOBAL OPTION: UPDATE CHECK
# whether to check for a newer version of MP3 Factory. it is highly recommended
# to enable this check since script development is ongoing.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sScriptUpdate='disable'
## (!) GLOBAL OPTION: LOGGING
# whether to enable logging of MP3 Factory operations. it is suggested to keep
# logging enabled.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sLog='enable'
## (!) GLOBAL OPTION: JUNK FILES
# whether to delete files flagged for discard to save storage space or move them
# to the /junk directory. in either case the file names are written to junk.txt
# so you can locate replacements. it is not suggested to set this to 'delete'
# unless you are working with copies of your files, as is recommended.
# value type: string
# valid values: keep, delete
# default value: 'keep'
sDelJunk='keep'
## (!) GLOBAL OPTION: RENAME FILES ON ERROR
# whether to rename problem files by prepending either '[E]' for error, '[W]'
# for warning or '[N]' for notice to the file so they are easier to identify
# should you want to process them further. the prefix is automatically removed
# if the problem is repaired and it passes an Integrity Check 2 task.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sRenErrFiles='enable'
## GLOBAL OPTION: DESKTOP NOTIFICATIONS
# whether you want to receive a desktop notification when a batch operation
# completes. notifications are automatically disabled if batch mode is disabled
# or the libnotity package is missing.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sNotify='enable'
## GLOBAL OPTION: DISPLAY PROGRAM OPTIONS
# whether to display the configuration options for a task prior to starting it.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sShowOpt='enable'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# whether to display ffprobe information. set this to 'skipmp3' to display this
# information only for non-mp3 files.
# value type: string
# valid values: enable, disable, skipmp3
# default value: 'skipmp3'
sIntegFfprobe='skipmp3'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# which bit rate encoding methods are acceptable for mp3 files, each separated
# with a pipe ( | ) character. files encoded using a variable bit rate (VBR) are
# preferred, however the default value keeps both VBR and constant bit rate
# (CBR) encoded files.
# value type: string
# valid values: VBR, CBR
# example value: 'VBR'
# default value: 'VBR|CBR'
sIntegMediainfoBitrateMode='VBR|CBR'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# minimum acceptable average bit rate (kbit/s) for both VBR and CBR encoded mp3
# files. 196 is a reasonable value for high quality files.
# value type: integer
# default value: 196
iIntegMp3guessencMinBR=196
## (!) MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# acceptable sample rates (Hz) for mp3 files, each separated with a pipe ( | )
# character.
# value type: string
# valid values: 32000, 44100, 48000
# example value: '44100'
# default value: '44100|48000'
sIntegMediainfoSamplerate='44100|48000'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# whether to require that the mp3 include a LAME info tag. the absence of this
# information does not, in and of itself, compromise audio quality nor what
# metadata the mp3 can hold, however discarding files which do not include this
# information may help to weed out poor quality files. also several integrity
# checks depend on a LAME tag being present. lastly, it is probably good form to
# write a LAME tag when encoding with LAME. note however that requiring the tag
# may cause many files to be flagged for discard, particularly CBR encoded files
# which often do not include one. set this to 'disable' to disable this check
# for all files, 'enable' to enable the check for all files, or 'skipcbr' to
# disable the check only for CBR encoded files which do not have a LAME tag.
# value type: string
# valid values: enable, skipcbr, disable
# default value: 'skipcbr'
sIntegMp3guessencReqLame='skipcbr'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# if a LAME tag is present in an mp3, a CRC checksum can be used to verify
# whether the audio has been altered. while this is a good way to weed out
# potentially poor quality files, this information is not always present,
# particularly with CBR encoded files, nor does does it guarantee the audio was
# not altered. set this to 'enable' to require CRC the verification for all
# files or 'disable' to disable it for all files. note that this check will not
# be performed if a LAME tag is not present.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sIntegMp3guessencCRC='enable'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# whether to keep mp3 files that include a CRC checksum in each audio frame.
# while this information can be used to verify the integrity of each individual
# audio frame, you may wish to discard such files since the space used to store
# this information is the same as that used to store the actual audio.
# value type: string
# valid values: keep, discard
# default value: 'discard'
sIntegMp3valAllowFrameCRC='discard'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# whether to keep mp3 files which where encoded using unwise encoder settings.
# note that this check will not be performed if a LAME tag is not present.
# value type: string
# valid values: keep, discard
# default value: 'discard'
sIntegMp3guessencAllowUnwise='discard'
## (!) MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# set the minimum lowpass filter frequency cutoff (Hz) point for a LAME encoded
# mp3. for more information see:
# https://wiki.hydrogenaud.io/index.php/Lame#Recommended_settings_details
# files which return 'unknown' for this check are automatically accepted. set
# this value to 'disable' to disable this check. note that this check will not
# be performed if a LAME tag is not present.
# value type: integer
# default value: 18500
iIntegMp3guessencMinLowpass=18500
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# set which audio channel layouts are acceptable for an mp3, each separated by a
# pipe ( | ) character. the generally preferred channel layouts are stereo and
# joint stereo.
# value type: string
# valid values: dualchannel, jointstereo, mono, stereo.
# example value: 'jointstereo'
# default value: 'stereo|jointstereo'
sIntegMp3guessencChLayout='stereo|jointstereo'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# whether to keep mp3 files which were not encoded from the original media.
# while discarding such files can weed out potentially poor quality files, this
# information is not always present and therefore many files may be flagged for
# discard.
# value type: string
# valid values: keep, discard
# default value: 'keep'
sIntegMp3guessencOrigMat='keep'
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# minimum acceptable song length in seconds for flac, mp3 and wav files. this
# may be useful for detecting damaged/truncated files when most are are expected
# to exceed a minimum length. set this to 0 to disable this check.
# value type: integer
# default value: 60
iIntegMinLen=60
## MAIN MENU ITEMS: INTEGRITY CHECK 1, INTEGRITY CHECK 2
# maximum acceptable song length in seconds for flac, mp3 and wav files. this
# may be useful for detecting concatenated files when most songs are not
# expected to exceed a given length. set this to 0 to disable this check.
# value type: integer
# default value: 600
iIntegMaxLen=600
## MAIN MENU ITEMS: INTEGRITY CHECK 1
# whether to keep flac or wav files which appear to be truncated.
# value type: integer
# valid values: keep, discard
# default value: 'discard'
iIntegShntoolTuncated='discard'
## MAIN MENU ITEMS: INTEGRITY CHECK 1
# whether to keep flac or wav files which contain junk at the end.
# value type: integer
# valid values: keep, discard
# default value: 'discard'
iIntegShntoolJunk='discard'
## MAIN MENU ITEMS: INTEGRITY CHECK 1
# whether to keep flac or wav files which habve inconsistant headers.
# value type: integer
# valid values: keep, discard
# default value: 'discard'
iIntegShntoolBadHeader='discard'
## MAIN MENU ITEMS: INTEGRITY CHECK 1
# set the minimum acceptable sample rate for flac files. set this to 0 to
# disable this check.
# value type: integer
# default value: 44100
iIntegShntoolSR=44100
## MAIN MENU ITEMS: INTEGRITY CHECK 1
# set the minimum bits per sample for flac files. 16 is a very common value for
# music files while 24 is sometimes used for very high quality music files. set
# this to 0 to disable this check.
# value type: integer
# default value: 16
iIntegShntoolBPS=16
## MAIN MENU ITEMS: INTEGRITY CHECK 1
# set the required number of audio channels for flac files. set this to 0 to
# disable this check.
# value type: integer
# default value: 2
iIntegShntoolCh=2
## MAIN MENU ITEM: SPLIT ALBUM FILE
# shnsplit options for formatting the file names when splitting an album file
# with an accompanying CUE file of the same name (i.e. an audio file named
# 'album.flac' must be accompanied by a CUE file named 'album.cue'). the
# following variables may be used:
#
# %p : replaced with the performer
# %a : replaced with the album name
# %t : replaced with the track title
# %n : replaced with the track number
#
# you may combine the variables with a separator (usually space, hyphen, space
# ( - )). do not add any input or output file types, names, or paths as this is
# handled internally. the default value will format the file name as:
# '<performer> - <track title>'
# value type: array
# example value, track no. and title: ( '%n - %t' )
# example value, performer, title and album: ( '%p - %t (%a)' )
# default value:( '%p - %t' )
aSplitShnsplitOpt=( '%p - %t' )
## MAIN MENU ITEM: SPLIT ALBUM FILE
# whether to keep the original album file and CUE sheet after a successful
# split.
# value type: string
# valid values: keep, discard
# default value: 'keep'
sSplitSrcFiles='keep'
## (!) MAIN MENU ITEM: CONVERT TO MP3
# LAME encoder options for encoding an mp3. the option '--preset' 'extreme'
# indicates the encoding type and quality which, in this case, is variable bit
# rate at the highest quality setting. using a high quality variable bit rate
# is preferable over a constant bit rate which is generally senseless for the
# mp3 format. for further information see:
# https://wiki.hydrogenaud.io/index.php/lame
# the '--noreplaygain' option assumes ReplayGain information will be written
# by loudgain since it can process a variety of file types and remove obsolete
# and potentially conflicting metadata, including APE tags.
# value type: array
# example value: ( '--brief' '--preset' 'standard' )
# default value: ( '--brief' '--preset' 'extreme' '--noreplaygain' '-T' )
aConvLameEncOpt=( '--brief' '--preset' 'extreme' '--noreplaygain' '-T' )
## MAIN MENU ITEMS: CONVERT TO MP3
# set which metadata you want to transfer from the source file to the mp3. the
# default value assumes ID3 tags will be written based on the file name and that
# the Tag To File Name task was run prior to encoding the mp3. if not disabled
# you may want to set this value to match that of the other tag options.
# value type: array
# example value: ( 'artist' 'title' 'genre' )
# default value: ( 'disable' )
aConvReqTags=( 'disable' )
## MAIN MENU ITEMS: CONVERT TO MP3
# whether to keep the original file after a successful conversion.
# value type: string
# valid values: 'keep', 'discard'
# default value: 'keep'
sConvSrcFiles='keep'
## MAIN MENU ITEMS: INTEGRITY CHECK 2
# set which ID3 tags are required for an mp3. set this to ( 'disable' ) to
# disable this check. if not disabled, you may want to set this value to match
# that that of the other tag options.
# value type: array
# default value: ( 'artist' 'title' 'genre' )
aInteg2ReqTags=( 'artist' 'title' 'genre' )
## MAIN MENU ITEMS: INTEGRITY CHECK 2
# whether to require that the mp3 include ReplayGain information.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sInteg2ExiftoolReqRG='enable'
## MAIN MENU ITEM: INTEGRITY CHECK 2
# whether to keep mp3 files which where modified by mp3gain. while the Optimize
# task attempts to reverse such changes by default, this is not always possible,
# nor is it always possible to detect if a file was modified by mp3gain unless
# the audio passes a CRC check.
# value type: string
# valid values: keep, discard
# default value: 'discard'
iInteg2ExiftoolKeepMp3gain='discard'
## MAIN MENU ITEM: INTEGRITY CHECK 2
# whether to accept the presence of obsolete APEv1/2 tags in an mp3 file (such
# tags are often written by mp3gain). note that loudgain can remove APEv2 tags
# if you use it to write ReplayGain information.
# value type: string
# valid values: keep, discard
# default value: 'discard'
sInteg2Mp3guessencAccptAPE='discard'
## MAIN MENU ITEM: INTEGRITY CHECK 2
# set which ID3 tag version(s) are acceptable for an mp3 file, each separated
# with a pipe ( | ) character. any ID3 tag versions found in the file which are
# not defined here will produce a 'NOTICE' level error. ID3v2.3 or 2.4 is
# preferred and ID3v1.x should be avoided whenever possible. set this to
# 'disable' to disable this check.
# value type: string
# valid values: 1.0, 1.1, 2.2.0, 2.3.0, 2.4.0
# example value: '2.3.0|2.4.0'
# default value: '2.4.0'
sInteg2Mp3guessencID3v='2.4.0'
## MAIN MENU ITEM: INTEGRITY CHECK 2
# integrity check calculates the size of the audio frames of an mp3 and anything
# exceeding this, such as metadata, is considered overhead. if the overhead
# exceeds this value in bytes a notice is issued. the default value of 20480 is
# equivalent to 20 kB. if you keep lyrics tags and/or cover art then this value
# may need to be substantially increased. set this to 0 to disable this check.
# value type: integer
# default value: 20480
iInteg2Mp3guessencFileOvrhd=20480
## (!) MAIN MENU ITEM: SPECTRAL ANALYSIS
# ffmpeg options for generating a spectrogram image of the file. note that the
# height of the image (s=WxH) must be a power of 2 (this shortcoming will
# apparently be addressed in a future version of ffmpeg). only if batch mode is
# disabled are the images saved, else they are piped directly to ffplay for
# viewing. do not alter the '-i' '<file>' option/value.
# value type: array
# example value: ( '-hide_banner' '-loglevel' 'error' '-xerror' '-y' '-i' '<file>' '-lavfi' 'showspectrumpic' )
# default value: ( '-hide_banner' '-loglevel' 'error' '-xerror' '-y' '-i' '<file>' '-lavfi' 'showspectrumpic=s=1600x1024:color=green' )
aIntegFfmpegPicOpt=( '-hide_banner' '-loglevel' 'error' '-xerror' '-y' '-i' '<file>' '-lavfi' 'showspectrumpic=s=1600x1024:color=green' )
## (!) MAIN MENU ITEM: SPECTRAL ANALYSIS
# ffplay options for viewing a spectrogram image of the file if batch mode is
# disabled. if you do not want to start ffplay in full-screen mode, remove the
# '-fs' option. if you only want to create the images without viewing them,
# run the Spectral Analysis task in batch mode.
# value type: array
# example value: ( '-hide_banner' '-loglevel' 'error' )
# default value: ( '-hide_banner' '-loglevel' 'error' '-fs' )
aIntegFfplayPicOpt=( '-hide_banner' '-loglevel' 'error' '-fs' )
## MAIN MENU ITEM: TAG TO FILE NAME
# set the format used when renaming files according to tag values. often file
# names for single songs follow the pattern '<artist> - <title>' as the default
# value provides. the characters - ( ) [ ] . or a single space may be used to
# separate file name elements and you may use multiple separators within the
# same array element, however do not mix tag specifiers and separators in the
# same array element (i.e. '(' 'album' ')' is fine while '(album)' is not). all
# characters must be enclosed in single quotes as in the default and example
# values. supported tag specifiers include album, artist, album_artist, date,
# genre, disc, title and track.
# value type: array
# example value: ( 'track' ' ' 'artist' ' - ' 'title' ' (' 'album' ')' )
# default value: ( 'artist' ' - ' 'title' )
aTag2FileFormat=( 'artist' ' - ' 'title' )
## MAIN MENU ITEM: CLEAN FILE NAME
# whether to convert diacritic characters in file names (À, Ë, Ì, Õ, Ú, etc.) to
# their ASCII equivalents.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sIconv='enable'
## (!) MAIN MENU ITEM: CLEAN FILE NAME
# array of Perl Compatible Regular Expressions for modifying file names. the
# default value will achieve the following:
#
# 1. remove 2 digits (typically track numbers) and any following hyphens,
# underscores, dots or spaces from the beginning of the file name, unless the
# digits are followed by a letter ('10cc' for example) or certain strings,
# case insensitive.
# 2. move 'the' from the beginning of the file name (typically the artist) to
# the end of the first segment of the file name, case insensitive. (e.g. 'The
# Doors' becomes 'Doors, The').
# 3. remove most bracket pairs, their contents and any trailing spaces or
# hyphens, except those containing certain strings, case insensitive.
# 4. remove question marks and most quote characters
# 5. replace underscores with spaces
# 6. replace 2 or more spaces with a single space
# 7. remove any remaining trailing spaces
# 8. title case the file name (i.e. 'artist - title' becomes 'Artist - Title')
# 9. correct case caused by title case (e.g. 'Zz Top' becomes 'ZZ Top')
#
# the expression '(?i)^(\[[EWN]\]\s\K)?' is included with several of the
# expressions. this expression simply ignores the error tags ([E], [W], [N])
# given to files which have problems and restarts the match after the tag.
#
# note that every expression must end with a forward slash ( / ) optionally
# followed by a replacement expression. do not use a single quote character
# ( ' ) in any of the expressions. for PCRE syntax and testing see:
# syntax: https://www.pcre.org/original/doc/html/pcrepattern.html
# testing: https://regexr.com/ (be sure to set the expression language to PCRE)
# WARNING: DO NOT ALTER THIS IF YOU ARE NOT COMPETENT WITH REGULAR EXPRESSIONS
# AND BE SURE TO TEST ANY MODIFICATIONS BEFORE INCORPORATING THEM.
# value type: array
# example expression (replace '&' with 'And'): '&/And'
# example expression (remove most quote characters): '["“”„‹›«»]/'
# example expression (remove all bracket pairs and their trailing spaces): '(?!^\[[EWN]\])[(\[][^)\]]*[)\]][\s-]*/'
# default value: ( '(?i)^(?:\[[EWN]\]\s\K)?(?!38 Special)[0-9]{2}[-_\.\s]+/' '(?i)^(?:\[[EWN]\]\s\K)?(the)\s(\S.+?)(\s-\s)/\2, \1\3' '(?i)(?!^\[[EWN]\]\s)[\[<(](?![^>)\]]*(live|extended|long|part|with|feat)\b)[^>)\]]*[>)\]][\s-]*/' '["“”„‹›«»?]/' '_/ ' '\s{2,}/ ' '\s+$/' '(?i)(?:^\[[EWN]\]\s\K)?(?:^|\b)(?<!'\'')([a-z])(\S+)?/\U\1\L\2' '(?i)^(?:\[[EWN]\]\s\K)?(abc|abba|atc|d\.n\.a\.|kc|r\.e\.m\.|reo|tlc|zz)\s/\U\1\u ' )
aCleanFileNameRE=( '(?i)^(?:\[[EWN]\]\s\K)?(?!38 Special)[0-9]{2}[-_\.\s]+/' '(?i)^(?:\[[EWN]\]\s\K)?(the)\s(\S.+?)(\s-\s)/\2, \1\3' '(?i)(?!^\[[EWN]\]\s)[\[<(](?![^>)\]]*(live|extended|long|part|with|feat)\b)[^>)\]]*[>)\]][\s-]*/' '["“”„‹›«»?]/' '_/ ' '\s{2,}/ ' '\s+$/' '(?i)(?:^\[[EWN]\]\s\K)?(?:^|\b)(?<!'\'')([a-z])(\S+)?/\U\1\L\2' '(?i)^(?:\[[EWN]\]\s\K)?(abc|abba|atc|d\.n\.a\.|kc|r\.e\.m\.|reo|tlc|zz)\s/\U\1\u ' )
## MAIN MENU ITEM: FIND DUPLICATES
# set a variance in bytes for finding potentially duplicate files based on the
# size of the audio streams. sizes are compared only between files sharing the
# same bit and sample rates and without considering metadata. this variance is
# intended to account for slightly differing audio stream sizes where one file
# may be a few seconds longer or shorter than another due to differing lengths
# of silence at the beginning and/or end of the track. the default value
# accounts for a 6 second difference at a bit rate of 245 kb/s which assumes
# files encoded with LAME preset 'extreme'. set this to 0 to force an exact size
# comparison or -1 to disable the check.
# value type: integer
# default value: 1470000
iFindDupSz=1470000
## (!) MAIN MENU ITEM: FIND DUPLICATES
# a Perl Compatible Regular Expression for finding potentially duplicate files
# based on similar song titles. by default the artist, file extension, the word
# 'the' and all bracket pairs and their contents are discarded and, of what
# remains, only the characters a-z and 0-9 are considered when comparing song
# titles. do not use a single quote character ( ' ) in the expression. for PCRE
# syntax and testing see:
# syntax: https://www.pcre.org/original/doc/html/pcrepattern.html
# testing: https://regexr.com/ (be sure to set the expression language to PCRE)
# WARNING: DO NOT ALTER THIS IF YOU ARE NOT COMPETENT WITH REGULAR EXPRESSIONS
# AND BE SURE TO TEST ANY MODIFICATIONS BEFORE INCORPORATING THEM.
# value type: string
# default value: '(?i)(?:^.+?-)?|(?:the\s*)?|\.[a-z0-9]+$|[[(][^)\]]*[)\]]|[^a-z]'
sFindDupTitleRE='(?i)(?:^.+?-)?|(?:the\s*)?|\.[a-z0-9]+$|[[(][^)\]]*[)\]]|[^a-z]'
## MAIN MENU ITEM: FILE NAME TO TAG
# specify the ID3 tags to write to an mp3 file when writing tags derived from
# the file name. internally, file names are broken into segments, each separated
# by ' - '. if the first tag specifier is '--artist', then the first file name
# segment will be written as the artist tag and so on. if there are more file
# name segments than tag specifiers, the remaining file name segments are
# ignored. similarly, if there are more tag specifiers than file name segments,
# the remaining tag specifiers are ignored. tag specifiers must be in eyeD3
# format using either the long (--artist) or short (-a) format.
# value type: array
# example value: ( '--artist' '--title' '--album' )
# default value: ( '--artist' '--title' )
aEyed3File2TagTags=( '--artist' '--title' )
## MAIN MENU ITEMS: STRIP METADATA
# stripping metadata from an mp3 file includes removing all ID3 tags, APEv2
# tags, Lyrics3 and Lyrics3v2 tags and ReplayGain information. this option
# determines what ID3 tags to restore after the metadata is stripped, provided
# the file contained it originally. setting this to ( 'disable' ) will cause no
# tags to be restored. if you prefer to write ID3 tags derived from the file
# name (typically 'artist name - track title') then you can disable this. if not
# disabled, you may want to set this value to match that that of the other tag
# options.
# value type: array
# example value: ( 'artist' 'title' 'genre' )
# default value: ( 'disable' )
aStripReqTags=( 'disable' )
## (!) MAIN MENU ITEMS: WRITE A TAG
# eyeD3 options for writing ID3 tags to mp3 files. accepted encoding values are
# 'latin1', 'utf8', 'utf16' or 'utf16-be'. the default value specifies that an
# 'ID3v2.4 tag is written with UTF-8 encoding which is the default encoding for
# an ID3v2.4 tag. if older decoders (music player software/hardware) do not
# display the expected song information then you may need to change the tag
# version and/or encoding type. don't add the '--max-padding' option here since
# padding is adjusted during the Optimize task.
# value type: array
# example value, older decoders: ( '--to-v1.1' '--encoding' 'utf16' )
# example value, older decoders: ( '--to-v1.1' '--encoding' 'latin1' )
# default value: ( '--to-v2.4' '--encoding' 'utf8' )
aTagEyed3Opt=( '--to-v2.4' '--encoding' 'utf8' )
## MAIN MENU ITEM: WRITE A TAG
# array of genre tags from which to select when writing a genre tag to an mp3.
# value type: array
# default value: ( 'Ambient' 'Soft' 'Medium' 'Hard' 'Blues' 'Brass' 'Classical' 'Country' 'Electronic' 'Folk' 'Funk' 'Hip-hop' 'Jazz' 'Latin' 'Newage' 'Pop' 'R&B' 'Rap' 'Reggae' 'Religious' 'Rock' 'Soul' )
aTagEyed3Genre=( 'Ambient' 'Soft' 'Medium' 'Hard' 'Blues' 'Brass' 'Classical' 'Country' 'Electronic' 'Folk' 'Funk' 'Hip-hop' 'Jazz' 'Latin' 'Newage' 'Pop' 'R&B' 'Rap' 'Reggae' 'Religious' 'Rock' 'Soul' )
## MAIN MENU ITEM: WRITE A TAG
# whether to preview the file before selecting a genre tag. previewing will
# occur only if batch mode is disabled. the decoder set by the 'sPlayExe' option
# (below) will be used to play the file.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sTagGenrePreview='enable'
## MAIN MENU ITEM: WRITE A TAG
# array of comment tags from which to select when writing a comment tag to an
# mp3. the following variables may be used in the tag:
#
# %v : replaced with the version number of MP3 Factory
# %d : replaced with the date (month/day/year)
# %t : replaced with the time in 24 hr. format
#
# the default value writes a comment tag with MP3 Factory version and date
# information. don't add the '--max-padding' option here since padding is
# adjusted during the Optimize task.
# value type: array
# example value, 'MP3 Factory %v' 'MP3 Factory %v - Encode date: %d'
# default value: ( 'MP3 Factory v%v %d' )
aTagEyed3Cmt=( 'MP3 Factory v%v %d' )
## MEUN ITEM: NORMALIZE GAIN
# loudgain options for writing ReplayGain information to the file. the
# '--striptags' option will remove all ID3v1.x, ID3v2.2 and APEv2 tags leaving
# only ID3v2.3 and/or ID3v2.4 tags. the '--id3v2version=4' option will cause
# loudgain to write an ID3v2.4 tag which is consistent with the other default
# tagging options in this file.
# value type: array
# default value: ( '--track' '--noclip' '--tagmode=i' '--striptags' '--id3v2version=4' )
aGainLoudgainOpt=( '--track' '--noclip' '--tagmode=i' '--striptags' '--id3v2version=4' )
## (!) MAIN MENU ITEM: OPTIMIZE
# whether to attempt to undo mp3gain modifications for mp3 files. note that it
# is not always possible to detect if a file was modified by mp3gain, nor is it
# always possible to undo the changes.
# value type: string
# valid values: enable, disable
# default value: 'enable'
sOptimizeMp3gainUndo='enable'
## MAIN MENU ITEMS: OPTIMIZE, INTEGRITY CHECK 2
# set the maximum amount of padding in bytes for ID3 tags in an mp3 file.
# padding is the extra space allotted to the tag so that a frame or tag can be
# added or edited quickly without having to rebuild the entire file. unless you
# plan to edit tags often, the default value of 0 should probably not be changed
# if you want to conserve storage space. note that the absence of padding does
# not affect the ability to modify the tags in the future.
# value type: integer
# default value: 0
iEyed3MaxPad=0
## MAIN MENU ITEM: PLAY
# program to use for playing audio files. by default ffplay is used with the
# same options as the 'aPlayFfplayOpt' option (below). to use a different
# program set the value to the name of the executable (case sensitive).
# value type: string
# example value: 'audacious'
# default value: 'ffplay'
sPlayExe='ffplay'
## (!) MAIN MENU ITEM: PLAY
# ffplay options for playing an audio file. add the '-fs' option if you want
# ffplay to start in full-screen mode.
# value type: array
# example value: ( '-hide_banner' '-loglevel' 'error' '-fs' '-showmode' 'waves' )
# default value: ( '-hide_banner' '-loglevel' 'error' '-autoexit' '-showmode' 'rdft' )
aPlayFfplayOpt=( '-hide_banner' '-loglevel' 'error' '-autoexit' '-showmode' 'rdft' )
## MAIN MENU ITEM: COLLECTION STATISTICS
# eyeD3 options for displaying various statistics for all mp3 files in the
# /working directory. if you have many files in the directory you may want to
# remove the '--verbose' option else the output could be quite lengthy.
# value type: array
# default value: ( '-P' 'stats' '--verbose' )
aStatEyed3Opt=( '-P' 'stats' '--verbose' )
## (!) MAIN MENU ITEM: REPAIR
# ffmpeg options for repairing mp3 files. the default value will copy the audio
# to a new file along with the supported metadata in ID3v2.4 format. do not
# alter the '-i' '<file>' option/value.
# value type: array
# default value: ( '-hide_banner' '-loglevel' 'info' '-i' '<file>' '-acodec' 'copy' '-id3v2_version' '4' )
aRepairFfmpegRepairOpt=( '-hide_banner' '-loglevel' 'info' '-i' '<file>' '-acodec' 'copy' '-id3v2_version' '4' )
## (!) MAIN MENU ITEM: REPAIR
# ffmpeg options for rebuilding mp3 files. by default only the audio stream and
# required essentials are copied to the new file. excess metadata, including
# artist, title, cover art, etc., is discarded so make sure the file name is
# correct beforehand so you can identify the file. do not alter the '-i'
# '<file>' option/value.
# value type: array
# example value: ( '-hide_banner' '-loglevel' 'warning' '-xerror' '-i' '<file>' '-ignore_unknown' '-map' '0:a' '-codec:a' 'copy' )
# default value: ( '-hide_banner' '-loglevel' 'warning' '-xerror' '-i' '<file>' '-ignore_unknown' '-map' '0:a' '-codec:a' 'copy' '-map_metadata' '-1' )
aRepairFfmpegRbldOpt=( '-hide_banner' '-loglevel' 'warning' '-xerror' '-i' '<file>' '-ignore_unknown' '-map' '0:a' '-codec:a' 'copy' '-map_metadata' '-1' )
## --- OPTIONAL ---
## (!) FONT FORMATTING AND COLORS
# if you want to change the font formatting and/or colors, uncomment those you
# wish to change and provide the new values. for options see:
# https://misc.flogisoft.com/bash/tip_colors_and_formatting
# the format is: '\e[<font format>;<font color>;<background color>m'
#TITLE='\e[1;36;40m' # bold, cyan on black
#MENU='\e[30;102m' # black on light green
#HEADER='\e[30;46m' # black on cyan
#INFO='\e[97;104m' # white on light blue
#QUESTION='\e[97;45m' # white on magenta
#SUCCESS='\e[92;40m' # light green on black
#NOTICE='\e[30;43m' # black on yellow
#WARNING='\e[30;103m' # black on light yellow
#ERROR='\e[97;41m' # white on red