Convert your audiobooks to opus to save space while maintaining quality.
Project description
YAACS
Convert your audiobooks to .opus for smaller files at equivalent quality.
Features
- Automatic bitrate selection
- (opt-in) Automatic audiobook discovery
- Automatic cover image discovery
- Automatic chapter discovery
- (opt-in) Automatic deletion of input files
- Multiprocessing to increase conversion throughput
Dependencies
YAACS depends on the following system packages for conversion:
- FFmpeg for metadata detection and conversion
YAACS also depends on the following Python packages for conversion:
- Mutagen for cover image installation
Building YAACS depends on the following Python packages:
- Lark for generating CUE parser code.
- Setuptools for creating the final Python wheel.
- Build as a standardized Python build frontend.
Building
Prepackaged versions of YAACS are available in this repo. However, building YAACS is also possible.
- First, setup a build environment. If you are confused, an example of how to do this is given below:
python -m venv venv
source venv/bin/activate # (bash/zsh) command to activate Virtual Environment
venv\Scripts\activate.bat # Windows cmd.exe command to activate Virtual Environment
- Next, install YAACS' dev dependencies:
pip install -r requirements-dev.txt # Installs the lark parser, along with build software for Python
- Now, you can run the standardized Python build command.
python -m build
- And lastly you can install YAACS.
pip install dist/yaacs-2.0.0-py3-none-any.whl # Note that your version of YAACS may generate a differently named file.
Installation
YAACS is available for installation via PyPI and on the AUR. Feel free to package YAACS for other systems!
Usage
$ yaacs -h
usage: yaacs [-h] [-v] [-t THREADS] [(-i INPUT [INPUT ...] | -a LOCATION [LOCATION ...]) [-x] [-o OUTPUT] [-m METADATA | -M METADATACHAPTER] [-b BITRATE] [-c CUESHEET] [-I COVER]]+
A Script to convert audiobooks to .opus
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-t THREADS, --threads THREADS
Number of subprocesses to spawn to convert books. Not specifying or 0 will default to core count.
-i INPUT [INPUT ...], --input INPUT [INPUT ...]
Locations of files for conversion. If this is a directory, all audio files recursively contained will be merged into one file.
-a LOCATION [LOCATION ...], --auto LOCATION [LOCATION ...]
Locations to auto-convert. Will recursively search for subfolders which contain no other directories and contain audio file(s). These files will be converted/merged.
-x, --delete Delete input files after conversion. DO NOT USE THIS IF YOU DON'T HAVE COMPLETE CONFIDENCE IN THIS TOOL.
-o OUTPUT, --output OUTPUT
Set output file name. Defaults to the name of the first input file with a .opus extension
-m METADATA, --metadata METADATA
FFMETADATA file containing desired final metadata. Use -M if the metadata also contains chapter information
-M METADATACHAPTER, --metadatachapter METADATACHAPTER
FFMETADATA file containing desired final metadata along with chapter data. Use -m to preserve automatic chapter detection.
-b BITRATE, --bitrate BITRATE
Set bitrate for output file. Defaults to 32kbps for inputs under 192kbps, and 192kbps for inputs above that threshold.
-c CUESHEET, --cuesheet CUESHEET
Set location for cuesheet file to read for chapter data. Only works if the input is a singular file.
-I COVER, --cover COVER
Explicitly set final cover file. Will attempt to autodiscover cover if not set.
$ yaacs -a ~/Audiobooks -x # Automatically detect all audiobooks (folders with no subfolders containing audio files) in ~/Audiobooks and convert them. Delete after conversion.
$ yaacs -i Warbreaker -m warbreaker.ffmeta -b 64k # Convert the audiobook within the Warbreaker folder at a bitrate of 64kbps. Use the warbreaker.ffmeta file for metadata, but still auto-detect chapters.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaacs-2.1.0.tar.gz.
File metadata
- Download URL: yaacs-2.1.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aef4449bd97aa8ff52330b6c04d33ebbc580bd84d11d93633d00bc0787daaab
|
|
| MD5 |
a6c7868536c3d74b5f9f8bd7f2854a6e
|
|
| BLAKE2b-256 |
afe16d59e6e9ee7004a433f462b59147e15a22ead725532aec42fe98fd3257ab
|
Provenance
The following attestation bundles were made for yaacs-2.1.0.tar.gz:
Publisher:
make-new-release.yml on rgarber11/YetAnotherAudiobookConverterScript
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yaacs-2.1.0.tar.gz -
Subject digest:
3aef4449bd97aa8ff52330b6c04d33ebbc580bd84d11d93633d00bc0787daaab - Sigstore transparency entry: 264974744
- Sigstore integration time:
-
Permalink:
rgarber11/YetAnotherAudiobookConverterScript@cc5bd7d74b11a8129a9c4e52a184d25c45464e30 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/rgarber11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
make-new-release.yml@cc5bd7d74b11a8129a9c4e52a184d25c45464e30 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yaacs-2.1.0-py3-none-any.whl.
File metadata
- Download URL: yaacs-2.1.0-py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcc07da38c52b334bd6e81084f6221acd0926344cfface6d66d2b4ce459fc8c6
|
|
| MD5 |
1643a3c7e5b223aff2586a2ce66066f0
|
|
| BLAKE2b-256 |
5ba5c1895c409344bcfecae92074b09f3fd9aa0d2ab39e0b3f7e4a4e124e52cb
|
Provenance
The following attestation bundles were made for yaacs-2.1.0-py3-none-any.whl:
Publisher:
make-new-release.yml on rgarber11/YetAnotherAudiobookConverterScript
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yaacs-2.1.0-py3-none-any.whl -
Subject digest:
fcc07da38c52b334bd6e81084f6221acd0926344cfface6d66d2b4ce459fc8c6 - Sigstore transparency entry: 264974749
- Sigstore integration time:
-
Permalink:
rgarber11/YetAnotherAudiobookConverterScript@cc5bd7d74b11a8129a9c4e52a184d25c45464e30 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/rgarber11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
make-new-release.yml@cc5bd7d74b11a8129a9c4e52a184d25c45464e30 -
Trigger Event:
push
-
Statement type: