flac2mp3
Python-based CLI audio format converter specifically designed for FLAC to MP3 conversions.
Install Package
pip install flac2mp3-cli
Description
This program is a multi-threaded FLAC to MP3 converter. It can convert a single FLAC file, or it can convert multiple FLAC files in a directory. Non-FLAC files in the directory are copied without conversion. The metadata of the original FLAC files is maintained in the converted MP3 files.
Usage
To run the program, use the following command:
flac2mp3 <input_path>
Where: <input_path> is the path to the FLAC file or directory of FLAC files to convert.
With Optionals Arguments:
flac2mp3 <input_path> -t <thread_count> -o <output_path> -b <bitrate> -ow
-t <thread_count>(optional) is the number of threads to use for conversion. If not provided, the program will use a default value.-o <output_path>(optional) is the path to the directory where the converted MP3 files (and copied non-FLAC files) should be saved. If not provided, the program will save the files in a default directory.-b <bitrate>(optional) is the bitrare of the mp3 file, from 1 to 5. Default is 5. (1: 96k, 2: 128k, 3: 192k, 4: 255k, 5: 320k)--overwrite/-ow(optional) is a flag that if enabled overwrites the output file if it already exists.
Converting a Single File
To convert a single FLAC file, provide the path to the file as the <input_path>:
flac2mp3 /path/to/your/file.flac
Converting a Directory
To convert all FLAC files in a directory, provide the path to the directory as the <input_path>:
flac2mp3 /path/to/your/directory
All FLAC files in the directory (and its subdirectories) will be converted to MP3.
Dependencies
This program uses the following Python packages:
alive_progressfor progress barsconcurrent.futuresfor multi-threadingosandshutilfor file and directory operationssys,time,subprocessfor system operationsargparsefor parsing the arguments from the command linemutagen.flacfor converting the flac files metadata
Note: ffmpeg client must be installed on the machine, see: https://ffmpeg.org/download.html to install guide.
Build Yourself
If you want to build this project yourself, follow these steps:
-
Clone the repository
Clone the repository to your local machine:
git clone https://github.com/yourusername/flac-to-mp3-converter.git
-
Install the project
Navigate into the project directory and install the project along with its dependencies:
cd flac-to-mp3-converter pip install .
License
This program is released under the MIT License. See the LICENSE file for more details.
About
This project was born out of a personal need. I needed a tool that could convert my extensive library of FLAC files to MP3 format all at once. This would allow me to enjoy my music collection on devices that don't support FLAC.
This is one of my first projects and I'm still learning, so feel free to correct me or suggest improvements.
Metadata
Release files for flac2mp3-cli 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flac2mp3_cli-1.1.1.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flac2mp3_cli-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / flac2mp3_cli-1.1.1.tar.gz
| Download URL | flac2mp3_cli-1.1.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4891748b14a3425a12b15574b278be0a14f76480e9e913f4dcaa7e28ddf55756
|
|
BLAKE2b-256 checksum How to use checksums |
d493976981459b89a98fd7f82829b3a0067eb649518e69d344c848f4e6a67568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / flac2mp3_cli-1.1.1-py3-none-any.whl
| Download URL | flac2mp3_cli-1.1.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ef8453585fe173c38e441970ae8887e54692642a2ea39a01c7fbf023fc862e6
|
|
BLAKE2b-256 checksum How to use checksums |
a19ead4bb2eed537fa90bb6eaa4d5da5befdcb3a5a2b6471795e270e6e08247c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for flac2mp3-cli 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.