caudec ~ Multiprocess Audio Converter


caudec is a command-line utility that transcodes (converts) audio files from one format (codec) to another, among other things.

It leverages multi-core CPUs and runs multiple processes concurrently (one per file and per codec, and more than one thread per codec when it supports it). The objective is to hog the CPU as much and as long as possible. One strategy is to sort input files by size, so that the largest files potentially get more threads towards the end of the job.

Features:

  • Supported input formats / codecs: WAV, AIFF, CAF, FLAC, WavPack, Monkey’s Audio, ALAC.
  • Supported output formats / codecs: all of the above, as well as LossyWAV / LossyFLAC, MP3, AAC (.m4a), Ogg Vorbis, Opus.
  • Supported platforms: macOS, Linux.
  • Transcoding to several different codecs at once is possible. In that case, decoding of input files is done only once.
  • Metadata is preserved (as much as possible) from one codec to another.
  • Artwork can be embedded into each file, and / or copied to the output directory. It can be done selectively (e.g. embed and / or copy one image for lossless files, and another image for lossy files).
  • Audio can be resampled (e.g. 48kHz to 44.1kHz) and downmixed (e.g. 6 channels to stereo). A profile can be provided to set a maximum value for the number of channels, bit depth and sampling rate. When a profile is provided, the source will only be altered after decoding and before encoding, if some metric of the source is above the given profile.
  • Multiprocess ReplayGain scanner for FLAC, WavPack, MP3, Ogg Vorbis, Opus.
  • Ability to hard link lossy files to a different directory when encoding to WavPack Hybrid. The point is to have two libraries that takes the storage of just one, with a lossy collection that has its own root directory and that’s easy to drag and drop to a device such as a smartphone or a Digital Audio Player (DAP).
  • Ability to touch files and album directories using metadata to reflect the music’s release date and duration (see example below).

github.com/gcocatre/caudec

Comments welcome