codecpod
English | 简体中文
An audio codec library that statically links FFmpeg, avoiding the hassle of pre-installed dependencies. Provides both a Rust API and Python bindings.
Features
- Bundles a static FFmpeg; zero external shared-library dependencies at runtime.
- Decoding: AAC, AC-3, ALAC, APE, FLAC, MP1/2/3, Opus, Vorbis, WavPack, various PCM/ADPCM, and more.
- Encoding: WAV, AIFF, FLAC, ALAC, AAC, MP3 (LAME), Opus, Vorbis.
- Optional resampling, downmixing, range trimming, normalization, and more.
Installation
pip install codecpod
Pre-built wheels are published to PyPI for Linux x86_64, macOS (Apple Silicon and Intel), and Windows x86_64.
Building from source
Building requires the following toolchain:
- A Rust toolchain; the latest stable is recommended.
nasm,clang, andlibclang.make,pkg-config.
On Windows the FFmpeg sources are built with autotools, so the toolchain must be the GNU
(MinGW-w64) one rather than MSVC: build inside an MSYS2 UCRT64
shell and target x86_64-pc-windows-gnullvm.
Build and install into the current environment:
uvx maturin develop --release
Or produce a wheel:
uvx maturin build --release
The first build downloads the FFmpeg and dependency source tarballs from upstream, pinned to the exact versions and SHA-256 checksums in
build.rs. This takes a while, so make sure your network connection is stable.If the
CODECPOD_VENDOR_DIRenvironment variable is set, the build skips downloading and uses the sources there directly. Seebuild.rsfor the directory layout.
Usage
import codecpod
import numpy as np
# Read audio metadata
info = codecpod.info("input.flac")
print(info.sample_rate, info.channels, info.frames, info.codec)
# Decode audio; returns (ndarray, sample_rate) by default, with channels_first=True
waveform, sample_rate = codecpod.load("input.flac")
# Resample to 16 kHz and downmix to mono while decoding
waveform, sample_rate = codecpod.load(
"input.flac",
sample_rate=16000,
mono=True,
)
# Encode to MP3 with explicit encoder parameters
codecpod.save(
"output.mp3",
waveform,
sample_rate,
codec=codecpod.Mp3(bit_rate=192000),
)
License
Copyright (C) 2026 zhoukz <me@zhoukz.com>
This project is distributed under LGPL-2.1-or-later; see LICENSE.
It statically links several third-party libraries; see
THIRD-PARTY-NOTICES.md for details.
Metadata
Release files for codecpod 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| codecpod-0.2.0.tar.gz | 82.0 kB | With provenance | Details for codecpod-0.2.0.tar.gz |
Built distributions (wheels)
Total release size: 27.7 MB
Release files / codecpod-0.2.0.tar.gz
| Download URL | codecpod-0.2.0.tar.gz |
|---|---|
| Size | 82.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5336d894bfb7874b1a18c0f1ce397a3bf4b2b2ce085f37b7a7a283bc36dcbe9e
|
|
BLAKE2b-256 checksum How to use checksums |
8912c67770ba70882727f9219d4982d2754032c16262a75654411fc133ca66bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | codecpod-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
982a22dbeb63498e21a66849b462df9bbc9e12cd4721f6aa657a35791cdbfceb
|
|
BLAKE2b-256 checksum How to use checksums |
b431c3476850ebce81a4d1911c175fedec66c03796d557622e1c469f30f71a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | codecpod-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2f660e0178837853cc5fe188e8be1d308560f9fbb39348a2f48955af41203d37
|
|
BLAKE2b-256 checksum How to use checksums |
ffd87bead8f601a08f85164868478c6038a90ecfe416b9ca9f6db3a5812f7284
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp314-cp314t-macosx_10_13_x86_64.whl
| Download URL | codecpod-0.2.0-cp314-cp314t-macosx_10_13_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
8d353815af4ee007e3236063c55e4488ce141765693a5073eb1977de6925bbe4
|
|
BLAKE2b-256 checksum How to use checksums |
e0d663787df274f74893ae11880de6ca55369d257aca20a9f913a181ae168de8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp38-abi3-win_amd64.whl
| Download URL | codecpod-0.2.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0150f14355e70b20052860beae7d19678d7079011f7b457459d55bd908b075a5
|
|
BLAKE2b-256 checksum How to use checksums |
7f05b537a1a7c4285f0d5ba5b1b51b22f1b812c6bd2b8c095081b2d7a5f8bee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp38-abi3-manylinux_2_28_x86_64.whl
| Download URL | codecpod-0.2.0-cp38-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.8 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c28d995ddbf3a97dcfe1451f49e94732367c3663dc3653001844e72abb7d3eac
|
|
BLAKE2b-256 checksum How to use checksums |
f2229ecf38b1f2c6b62f486b135ce134cab58c4e17fae98e7502692dcdd6630c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | codecpod-0.2.0-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
daa01d252a32801d559a41fbb22ee96518dd6ad542df3645da90c0251fb75f47
|
|
BLAKE2b-256 checksum How to use checksums |
14c92b8e6f564c2024d08643a32de2da13b469158bd20c4e79ee107bbb485f32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logRelease files / codecpod-0.2.0-cp38-abi3-macosx_10_13_x86_64.whl
| Download URL | codecpod-0.2.0-cp38-abi3-macosx_10_13_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.8 abi3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
febc0a92e56d417fe625243734b67fba53237c2a7846d159b037aaaf7857e734
|
|
BLAKE2b-256 checksum How to use checksums |
a3b766ca6f6b40939e8808bc3835e82d030b47fd67ff47835797516b7b926208
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logSecurity for codecpod 0.2.0
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.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for codecpod-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.