Skip to content
/ convopus Public

a Python CLI program for converting audio files to opus audio format.

License

Notifications You must be signed in to change notification settings

D221/convopus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

convopus

GitHub release (latest by date) GitHub GitHub Workflow Status

convopus is a Python CLI program for converting audio files to opus audio format.

Demo

Features

  • Windows / Linux / macOS / Android (via Termux) support
  • Customizable bitrate, vbr and more (via config.json)
  • Support of various input audio formats / containers
  • Fast multi threading converting
  • Recursive conversion

Installation

Must have installed ffmpeg and added to PATH

pip install convopus

Build

git clone https://github.com/D221/convopus
cd convopus
pip install .

Usage

convopus -h # for info
# The pogram detects directory or file
convopus /path/to/directory
convopus /path/to/file.flac
usage: convopus [-h] [-r] [--mp3] [-c CONTAINER] [--vbr {on,off}] [-b BITRATE]
                [-k | -dk] [-m | -nm] [--config] [-v]
                [input]

A Python CLI program for converting audio files to opus

positional arguments:
  input                 Input file or directory (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)

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

License

MIT