Recompress Audio
pip install rca==0.8.2
The Problem: If you recompress lossless audio for use on space-sensitive devices such as a cell phone or Raspberry Pi, then RCA can help you re-compress those lossless tracks whenever improved versions of your codec are released or when you change your desired encoding settings.
It does this by keeping track of the encoder's version and flags used in a simple text file that resides along-side the audio.
You can also characterize your tracks as speech or music, stereo or mono, simple or complex (amung others), which RCA uses to tailor the encoding flags and bitrates.
RCA is simple to use, command-line driven, and doesn't require any changes to your directory layout or audio filenames.
You characterize a given directory audio tracks by populating a new
properties.yml
file with something like the following:
tracks:
type: music
complexity: moderate
channels: stereo
The above tells RCA that all tracks are stereo music of moderate complexity.
Here's a more complex example of a CDs having music, commentary, sound effects, and two trailing filler track of dead-air:
tracks:
type: music
complexity: simple
channels: stereo
track03:
type: effects
complexity: moderate
speech:
range: [4, -, 9, 12]
complexity: complex
channels: mono
filler:
range: [13, 14]
The above tells RCA that:
You then run RCA while specifying your desired output codec, such as
rca opus
, which encodes the tracks according to the Ogg Opus profiles,
which can be customized.
pip3 install rca