Skip to main content

plibflac

This package provides a Python library for reading and writing audio files in FLAC (Free Lossless Audio Codec) format.

plibflac is implemented as a wrapper around the reference FLAC implementation (libFLAC) written by Josh Coalson and maintained by Xiph.Org.

Installation

Install this package from PyPI by running:

pip install plibflac

If you want to build the package from source (e.g., from the git repository), you will need to have a C compiler and the Python headers installed.

Project goals

The main goal of this project is to provide a portable and efficient interface for reading and writing raw sample data, in FLAC format, from Python applications.

This package currently does not implement the complete functionality provided by the FLAC library. If there are particular missing features that your application needs, please report them via GitHub issues.

Example

In the code below, we first open a FLAC file and print the first 10 samples of each channel. Next, we read the entire stream and write it out to a new FLAC file (re-encoding it using compression level 8.)

import plibflac

with plibflac.Decoder("input.flac") as decoder:
    samples = decoder.read(10)
    for i, s in enumerate(samples):
        print("First 10 samples of channel {}: {}".format(i, list(s)))

    decoder.seek(0)
    with plibflac.Encoder("output.flac", compression_level=8,
                          channels=decoder.channels,
                          bits_per_sample=decoder.bits_per_sample,
                          sample_rate=decoder.sample_rate) as encoder:
        while data := decoder.read(1000):
            encoder.write(data)

Metadata

Release files for plibflac 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plibflac 1.0.1
File Size Uploaded
plibflac-1.0.1.tar.gz 1.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for plibflac 1.0.1
File
plibflac-1.0.1-cp35-abi3-win_amd64.whl CPython 3.5 abi3 Windows x86-64 Details
plibflac-1.0.1-cp35-abi3-win32.whl CPython 3.5 abi3 Windows x86-32 Details
plibflac-1.0.1-cp35-abi3-musllinux_1_2_x86_64.whl CPython 3.5 abi3 Linux musl 1.2+ x86-64 Details
plibflac-1.0.1-cp35-abi3-musllinux_1_2_i686.whl CPython 3.5 abi3 Linux musl 1.2+ x86-32 Details
plibflac-1.0.1-cp35-abi3-musllinux_1_2_armv7l.whl CPython 3.5 abi3 Linux musl 1.2+ ARMv7l Details
plibflac-1.0.1-cp35-abi3-musllinux_1_2_aarch64.whl CPython 3.5 abi3 Linux musl 1.2+ ARM64 Details
plibflac-1.0.1-cp35-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.5 abi3 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
plibflac-1.0.1-cp35-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl CPython 3.5 abi3 Linux glibc 2.17+ ARMv7l, Linux glibc 2.31+ ARMv7l Details
plibflac-1.0.1-cp35-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.5 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
plibflac-1.0.1-cp35-abi3-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl CPython 3.5 abi3 Linux glibc 2.28+ x86-32, Linux glibc 2.12+ x86-32 Details
plibflac-1.0.1-cp35-abi3-macosx_11_0_arm64.whl CPython 3.5 abi3 macOS 11.0+ ARM64 Details

Total release size: 7.2 MB

Release files / plibflac-1.0.1.tar.gz

Download URL plibflac-1.0.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
f9cf08501eb86587af6b5942f80afedfd3648d705321da247f38806f06d1091b
BLAKE2b-256 checksum
How to use checksums
5c35bdb8f2a44a5cfd13bf97447de2e68f8fa0f76b12ae74f1e435693cb47119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-win_amd64.whl

Download URL plibflac-1.0.1-cp35-abi3-win_amd64.whl
Size 126.4 kB
Tags CPython 3.5 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c25b3bad3165a1d7410698f94d6633b789a894a06f83a925901d774adf3103ac
BLAKE2b-256 checksum
How to use checksums
a66f70b6a754054793dce3cae2f467485ae4e68b90c49f02917f8666016bf692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-win32.whl

Download URL plibflac-1.0.1-cp35-abi3-win32.whl
Size 120.6 kB
Tags CPython 3.5 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
511bdfc260ce0f086e32198c4ea07a58a77e430acf05a9fdba3afc758353c8ae
BLAKE2b-256 checksum
How to use checksums
a57af98bc395893209bc3244c1a01e81190f242b29038310634ebaac037a91c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-musllinux_1_2_x86_64.whl

Download URL plibflac-1.0.1-cp35-abi3-musllinux_1_2_x86_64.whl
Size 701.9 kB
Tags CPython 3.5 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
e8bca65f9d6fc3768280d580883c163850490231dd14c36e31486132921675fe
BLAKE2b-256 checksum
How to use checksums
b58215cd1b223e954b940ea40e4f24cb00522733afa50c9ff6936f9801529747
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-musllinux_1_2_i686.whl

Download URL plibflac-1.0.1-cp35-abi3-musllinux_1_2_i686.whl
Size 718.9 kB
Tags CPython 3.5 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
c2e0eb2b7b310ed0215addf1aaeb000cd2af75594ecc1080cea438a65c9302e9
BLAKE2b-256 checksum
How to use checksums
147253ff674603c42fbb20114effb1f62bb325fde20f4082af0d2e1ef6c3b600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-musllinux_1_2_armv7l.whl

Download URL plibflac-1.0.1-cp35-abi3-musllinux_1_2_armv7l.whl
Size 503.9 kB
Tags CPython 3.5 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
725fdb13dc27739f19202ff7147ec1b24b61344ab32682eee28cf5982b74e91b
BLAKE2b-256 checksum
How to use checksums
fdf32bb0867bab2ad68e748cc1d663b1c42752790f3faf5b227a1deee72a2c5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-musllinux_1_2_aarch64.whl

Download URL plibflac-1.0.1-cp35-abi3-musllinux_1_2_aarch64.whl
Size 606.3 kB
Tags CPython 3.5 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
4ce55b606d5cffced8c2850656afe97e2a00e43b90bd6ea9f5635f8f356f1491
BLAKE2b-256 checksum
How to use checksums
011e289110ac1afbb63b20155071b9262125952bdbb532f4893a2c0df56a94c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL plibflac-1.0.1-cp35-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 714.8 kB
Tags CPython 3.5 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
6c0973cdf584c0fdcb34c280ecf2ca17983e1a434760d1800a591ff721d20ef4
BLAKE2b-256 checksum
How to use checksums
0c948f61218bf7b1c53e5d302aa29a1c217a8eb48b0dfdd0e96f9aca807a9843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl

Download URL plibflac-1.0.1-cp35-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl
Size 525.7 kB
Tags CPython 3.5 Linux glibc 2.17+ ARMv7l Linux glibc 2.31+ ARMv7l abi3
SHA-256 checksum
How to use checksums
bbdf5527fc4a2f26463bc337adc199aa43a61dbb026d3ad13181d2365cf8e2a3
BLAKE2b-256 checksum
How to use checksums
7b87da7bab61005b4c2e724aecf86c74416744388bbc1d0da9871622208f4606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL plibflac-1.0.1-cp35-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 620.2 kB
Tags CPython 3.5 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
3c120bda6648fd88ded3f4870eb170892ed656a46ab312f696afc801b5028266
BLAKE2b-256 checksum
How to use checksums
37a69ce9435bfee06236af2a0179c5fb5e4990f0d42909d068d6274014605840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl

Download URL plibflac-1.0.1-cp35-abi3-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl
Size 720.7 kB
Tags CPython 3.5 Linux glibc 2.12+ x86-32 Linux glibc 2.28+ x86-32 abi3
SHA-256 checksum
How to use checksums
c59135fbda4674fdafafaaf7df3c9e61ca620584c2ba5a58b30de8f069b9852b
BLAKE2b-256 checksum
How to use checksums
5f0e463822308e59ebcd5292b8c66c5b89773c2834b31b4b6b550550624599be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / plibflac-1.0.1-cp35-abi3-macosx_11_0_arm64.whl

Download URL plibflac-1.0.1-cp35-abi3-macosx_11_0_arm64.whl
Size 157.7 kB
Tags CPython 3.5 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e99df1cf907ad35781f839aa2bfde2dbbfbe836187af5ba055783fda380d17f1
BLAKE2b-256 checksum
How to use checksums
d4c28e8acaae140dd6a5630350d7f28a1a03af1feadf5574c4e4355e80eca0f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

12 release files

1.0.0

11 release files

0.3.0

11 release files

0.2.0

11 release files

0.1.0

17 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page