Transcode#
This is a plugin for Moe that provides functionality for transcoding music.
Currently only flac -> mp3 [v0, v2, 320] is supported.
Installation#
Install via pip
$ pip install moe_transcode
-
Important
Ensure
ffmpeg
is in your respective OS’s path environment variable.
Configuration#
Add transcode
to the enabled_plugins
configuration option.
This plugin has the following configuration options:
transcode_path = {library_path}/transcode
The default path for transcoded files.
API#
moe_transcode
Transcode music.
- class I#
Type hint representing either an Album or a Track.
alias of TypeVar(‘I’, ~moe.library.album.Album, ~moe.library.track.Track)
- transcode(item: I, to_format: Literal['mp3 v2', 'mp3 v0', 'mp3 320'], out_path: Path | None = None, overwrite: bool = False) I #
Transcodes a track or album to a specific format.
- Parameters:
item – Track or Album to transcode. The track, or tracks contained in the album will only be transcoded if they are flacs.
to_format – Format to transcode to.
out_path – Path of the transcoded item. This defaults to the formatted path per the configuration relative to the
transcode_path
setting.overwrite – Whether or not to overwrite existing files.
- Returns:
The transcoded track or album.
- Raises:
ValueError –
item
contains a non-supported audio format.