transflac - Man Page
convert FLAC audio files to lossy formats.
Synopsis
transflac [input_FLAC_directory] [output_lossy_directory] [lossy_format] [codec_quality]
Description
The process of converting FLAC files to lossy formats and preserving tag information can be a bit tedious. transflac is designed to automate this. It will start at the input_flac_directory and recursively walk the directory structure converting each flac audio file to the specified lossy codec - preserving all associated tag information. Additionally, any cover art (stored in the directory structure as folder.jpg) will be duplicated in the target lossy directories.
Configuration
transflac sources two configuration files on startup - /etc/transflac.conf and $HOME/.transflac.conf, in that order.
The configuration options stated in those files can be overridden by providing the appropriate flags at runtime.
The configuration variables have to be set as follows:
- VARIABLE="value"
"value" needs to be quoted.
- All shell escaping/quoting rules apply.
- Here is a list of options transflac recognizes:
- input_flac_dir=""
Specifies the directory starting point which will be recursively search for FLAC audio files. All FLAC audio files in the directory structure will be converted to the specified lossy codec. Default value is "$1" which is arg1 from the command line invocation. This value is case sensitive. Any symlinks that are encountered will be resolved and the physical path will be displayed.
- output_lossy_dir=""
Specifies the target directory which will be used to store the lossy audio files which are created during the conversion process. Default value is "$2" which is arg2 from the command line invocation. This value is case sensitive. Any symlinks that are encounted will be resolved and the physical path will be displayed.
- lossy_codec=""
Specifies the lossy codec which will be used to convert the FLAC audio files. Default value is "$3" which is arg3 from the command line invocation. This value is NOT case sensitive. OPUS generally will provide the best sound quality for a given filesize or bitrate - and is the recommended codec.
Valid values are: OPUS | OGG | AAC | MP3- codec_quality=""
Specifies the quality preset which will be used to encode the lossy audio files. Default value is "$4" which is arg4 from the command line invocation. This value is NOT case sensitive. OPUS STANDARD quality provides Full bandwidth stereo music, good quality approaching transparency - and is the recommended setting.
Valid values are: LOW | MEDIUM | STANDARD | HIGH | PREMIUMCODEC LOW MEDIUM STANDARD HIGH PREMIUM OPUS 48 kbps 64 kbps 96 kbps 128 kbps 192 kbps OGG 80 kbps 96 kbps 112 kbps 128 kbps 160 kbps AAC 40 kbps 80 kbps 96 kbps 128 kbps 224 kbps MP3 85 kbps 100 kbps 115 kbps 130 kbps 165 kbps
Examples
Possible ways one can call transflac:
- transflac
"You will be prompted to enter all options. If you have customized options in $HOME/.transflac.conf those values will be substituted.
- transflac [input_flac_dir] [output_lossy_dir] [lossy_codec] [codec_quality]
transflac processing will proceed with the options entered on the command line.
Backend Tools
transflac requires the following backend tools to work:
- opus-tools - Required to convert files to the OPUS lossy format
- vorbis-tools - Required to convert files to the OGG Vorbis lossy format
- ffmpeg - Required to convert files to the AAC or MP3 lossy formats
- flac - Required to convert files from the FLAC lossless format
- rsync - Required to copy cover art files to the new lossy format directory structure
- figlet - Required to facilate display formatting
See Also
Author
Gerald Cox <gbcox@fedoraproject.org>