convopus
convopus is a Python CLI program for converting audio files and directories to opus — or MP3 — using ffmpeg.
Features
- Convert audio to Opus, or MP3 with
--mp3 - Convert whole directories, with optional recursive folder scanning (
-r) --outdirectory for converted files with mirrored folder structure- Fast multiprocessing conversion (
-m) - Multiple input files / directories in a single run
- Customizable via config.json: bitrate, container, VBR, convertible file types, defaults for every flag
- Cross-platform: Windows, Linux, macOS, Android (via Termux)
- Live progress bars per file and for the whole run
Requirements
- ffmpeg installed and on your PATH
- Python 3.10+
Installation
pip install convopus
Or from source with uv:
git clone https://github.com/D221/convopus
cd convopus
uv tool install .
Usage
convopus -h # full help
convopus music/ # convert a directory (originals are kept)
convopus -r music/ # include subdirectories
convopus -r --out converted/ music/ # write results to converted/, originals untouched
convopus -dk album/ # delete originals after converting
convopus -m -r biglibrary/ # convert in parallel
convopus --mp3 -k song.flac # convert to MP3 instead of opus
convopus a.flac b/ c.wav # multiple inputs in one run
With -o/--out DIRECTORY converted files are written to that directory instead of next to the originals: the input structure is mirrored under it — subfolders are recreated when -r/--recursive is used, otherwise files are placed directly in the output directory.
usage: convopus [-h] [-r] [--mp3] [-c CONTAINER] [--vbr {on,off}] [-b BITRATE]
[-o DIRECTORY] [-k | -dk] [-m | -nm] [--config] [-v]
[input ...]
A Python CLI program for converting audio files to opus
positional arguments:
input Input files or directories (optional) (default: None)
options:
-h, --help show this help message and exit
-k, --keep-original-files
Keeps original files after conversion (default: False)
-dk, --delete-original-files
Delete original files after conversion (default:
False)
-m, --multithreading Use multithreading for faster conversion (default:
False)
-nm, --no-multithreading
Do not use multithreading (default: False)
--config Prints config location and it's content (default:
False)
-v, --version show program's version number and exit
Conversion Options:
-r, --recursive Also convert files in subdirectories (default: False)
--mp3 Convert to mp3 instead - 320 or V0 depending on VBR
(default: False)
-c CONTAINER, --container CONTAINER
Container for audio files (.ogg, .opus, .oga, .mkv,
.webm) (default: .opus)
--vbr {on,off} Variable Bitrate option (default: on)
-b BITRATE, --bitrate BITRATE
Preferred bitrate for audio files (default: 128k)
-o DIRECTORY, --out DIRECTORY
Output directory for converted files (input structure
is mirrored under it) (default: None)
Configuration
You can customize settings in config.json located in:
| OS | config.json location |
|---|---|
| Windows | %LocalAppData%\D221\convopus |
| Linux | ~/.config/convopus |
| macOS | ~/Library/Application Support/convopus |
You can override the config file location with the CONVOPUS_CONFIG environment variable. Configs from older convopus versions are migrated automatically on first run.
The default config:
{
"bitrate": "128k",
"container": ".opus",
"keep": true,
"vbr": "on",
"recursive": false,
"multi_threading": true,
"common_types": [".flac", ".mp3", ".wav", ".m4a", ".aac", ".webm", ".mp4", ".avi", ".mkv", ".mpc", ".wma"]
}
| Key | Meaning |
|---|---|
| bitrate | Target bitrate for opus, e.g. 128k |
| container | Output container for opus: .opus, .ogg, .oga, .mkv, .webm |
| keep | Keep original files after conversion (command-line -k/-dk override this) |
| vbr | on/off — VBR for opus; for MP3, on = V0 and off = 320k |
| recursive | Convert subdirectories too (command-line -r overrides this) |
| multi_threading | Convert in parallel (command-line -m/-nm override this) |
| common_types | File extensions that get converted |
Keys are matched case-insensitively — configs written by older convopus versions keep working. Missing or invalid values fall back to defaults with a warning instead of failing, so a broken config never stops the CLI from running.
License
Release files for convopus 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| convopus-1.5.0.tar.gz | 18.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| convopus-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.7 kB
Release files / convopus-1.5.0.tar.gz
| Download URL | convopus-1.5.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fdb59ceaf167e6374c321943ff0a7e730e566b6299b65124bcaa3298acc4482
|
|
BLAKE2b-256 checksum How to use checksums |
6960ad1a611a1fc5a5f0cd163063e65e094c308315e9e1836591f94d81b6de34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / convopus-1.5.0-py3-none-any.whl
| Download URL | convopus-1.5.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a22eb6de84ca6bb6dfe151b40b33dfa8bf9cfe86ebdcfe25755f0aaa7a05e7eb
|
|
BLAKE2b-256 checksum How to use checksums |
c89da39a5bcd8791ed0596def130a56c228a6cf3fe8871582bb7d2ea4f7f5c1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|