Audio codec library backed by a statically-linked, source-built FFmpeg.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codecpod-0.1.0.tar.gz.
File metadata
- Download URL: codecpod-0.1.0.tar.gz
- Upload date:
- Size: 81.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43dffbbfc7b41645d7110e09b24035b40c4bbb4d6271eb5af4b3e34b13a6bf6e
|
|
| MD5 |
e5674736d72825cc2aa5b58d892ec7fd
|
|
| BLAKE2b-256 |
c3756b4ce9c12a2031dae57afe6ff71bbaa9ad4598078a0d8d4f7e2ee6d2894e
|
Provenance
The following attestation bundles were made for codecpod-0.1.0.tar.gz:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0.tar.gz -
Subject digest:
43dffbbfc7b41645d7110e09b24035b40c4bbb4d6271eb5af4b3e34b13a6bf6e - Sigstore transparency entry: 1708149654
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.14t, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d209b501b27cd46ea4d88674a056176ce32c6cdf76334c6128535ce7e315dc5d
|
|
| MD5 |
2c4858b01913c2cfdd019ba6af72def0
|
|
| BLAKE2b-256 |
ff213c1dc20ab69b062481e033b54e749aabfba448fccd39b0c5d82f5d784ac3
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl -
Subject digest:
d209b501b27cd46ea4d88674a056176ce32c6cdf76334c6128535ce7e315dc5d - Sigstore transparency entry: 1708149831
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.14t, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c283a5d2f17a4f1e1f975936cb49883b993e5bef3787de21584931973b7f4256
|
|
| MD5 |
8893b1afd4b3c38140b62676498a7be2
|
|
| BLAKE2b-256 |
26a1a920b58192ae8d69ddd02f52f6d1861d193d45f912235f1716083f9d91ea
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl -
Subject digest:
c283a5d2f17a4f1e1f975936cb49883b993e5bef3787de21584931973b7f4256 - Sigstore transparency entry: 1708149744
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp314-cp314t-macosx_10_13_x86_64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp314-cp314t-macosx_10_13_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.14t, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef37fb614f0a991dd68f6131c2fda21fc516bff857dd6b0e17846372ba9d0a22
|
|
| MD5 |
7f5116945ec364bae7c79c986afaf638
|
|
| BLAKE2b-256 |
a34fd95d9af20fbaf4cd93f9ce6d6b754c31a78d91bf5ade22b5bf088cf3aacc
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp314-cp314t-macosx_10_13_x86_64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp314-cp314t-macosx_10_13_x86_64.whl -
Subject digest:
ef37fb614f0a991dd68f6131c2fda21fc516bff857dd6b0e17846372ba9d0a22 - Sigstore transparency entry: 1708150300
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.13t, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c68436af4f3fec23701b480a7ab3118e7db0ebf1f28bd080b81348df9399771d
|
|
| MD5 |
2bfca71342f902f27448d8b0d5250565
|
|
| BLAKE2b-256 |
0d16a522f4b87b9acc504005afee5593550a07c6654060dfdc3447d2e2f0fda1
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl -
Subject digest:
c68436af4f3fec23701b480a7ab3118e7db0ebf1f28bd080b81348df9399771d - Sigstore transparency entry: 1708149909
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.13t, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad82a42c9d97cffe2dcebef66732e50669d07ae078416728b2534457f6d4f006
|
|
| MD5 |
820368346602af4a6c33b98943c636bd
|
|
| BLAKE2b-256 |
c8ba37a0b209956bbc7394e186bf93ab8d3837ddb968430275a89e89dc85c836
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl -
Subject digest:
ad82a42c9d97cffe2dcebef66732e50669d07ae078416728b2534457f6d4f006 - Sigstore transparency entry: 1708150225
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp313-cp313t-macosx_10_13_x86_64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp313-cp313t-macosx_10_13_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.13t, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf7a90b752b6e853e14bd474e6524fd41465350cccc9224d03ae1e473e50712
|
|
| MD5 |
12b4fb7ebe0315bb8ad8ecc4a5ad667a
|
|
| BLAKE2b-256 |
87a09d4ba5a4504b4ec66b23f6021d2561e02b4c6f2b2690bbcc745effc52aaa
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp313-cp313t-macosx_10_13_x86_64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp313-cp313t-macosx_10_13_x86_64.whl -
Subject digest:
edf7a90b752b6e853e14bd474e6524fd41465350cccc9224d03ae1e473e50712 - Sigstore transparency entry: 1708150158
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp37-abi3-win_amd64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08aea2f2a89fd17a346b29b50243f9f33ac9d908c016d8e7dea9fc9b0b863cb9
|
|
| MD5 |
563e7b72b44dea9768e7a08b69092714
|
|
| BLAKE2b-256 |
2476d17be545ec374cc57d65df24c94169798c248dadf1bd7231aec7004efb6b
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp37-abi3-win_amd64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp37-abi3-win_amd64.whl -
Subject digest:
08aea2f2a89fd17a346b29b50243f9f33ac9d908c016d8e7dea9fc9b0b863cb9 - Sigstore transparency entry: 1708150065
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp37-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp37-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa62e0e034e71f6f8976be96eb386628033c0c2e28b10d413d2230cf2b2c252
|
|
| MD5 |
96d2e6975a0262b68d66991d418f71d4
|
|
| BLAKE2b-256 |
f39a3c35607f5de4e5b095988f956f3defb036b83c21c66dc1c754182cd386b2
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp37-abi3-manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp37-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
ffa62e0e034e71f6f8976be96eb386628033c0c2e28b10d413d2230cf2b2c252 - Sigstore transparency entry: 1708150484
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp37-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e19e3a2d103968905bc2a2e226a7a97fc742ac33f9fbdbf868d193d0b78dfdf
|
|
| MD5 |
1bd8da997430935678490105eaa7bb88
|
|
| BLAKE2b-256 |
0b02e4de78b4ebbcb5c1d3a2e91443e1f51b0f0f24f54df44be03e5e2337afa6
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp37-abi3-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp37-abi3-macosx_11_0_arm64.whl -
Subject digest:
6e19e3a2d103968905bc2a2e226a7a97fc742ac33f9fbdbf868d193d0b78dfdf - Sigstore transparency entry: 1708150395
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type:
File details
Details for the file codecpod-0.1.0-cp37-abi3-macosx_10_13_x86_64.whl.
File metadata
- Download URL: codecpod-0.1.0-cp37-abi3-macosx_10_13_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.7+, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ed11a47df3c9d062e7b653c524584cf596dda7631c1408a9978078e1ed581e
|
|
| MD5 |
f3e6c71107a90c8e40fdb81467ea6fb8
|
|
| BLAKE2b-256 |
4a20da2672b361f0a2ea50cc27020585b67724c3f33167792af26b25b16692a8
|
Provenance
The following attestation bundles were made for codecpod-0.1.0-cp37-abi3-macosx_10_13_x86_64.whl:
Publisher:
wheels.yml on zhoukezi/codecpod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codecpod-0.1.0-cp37-abi3-macosx_10_13_x86_64.whl -
Subject digest:
07ed11a47df3c9d062e7b653c524584cf596dda7631c1408a9978078e1ed581e - Sigstore transparency entry: 1708149977
- Sigstore integration time:
-
Permalink:
zhoukezi/codecpod@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/zhoukezi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@7beb1db787cc11ca7d301a83d254f258ae8e3ceb -
Trigger Event:
push
-
Statement type: