NTSC encoder implemented as a pybind11 extension
Project description
ntsc-encoder (pybind11)
This directory builds the ntsc_encoder Python extension module using C++/pybind11.
Requirements
- Python 3.9+
- A C++ compiler + CMake 3.18+
- No OpenCV dependency is required to build/install this wheel.
The input is a NumPy HxWx3
uint8array (e.g. produced bycv2.imread()+cv2.cvtColor). - Build tools:
python -m pip install -U build twine
Build a wheel/sdist locally
From this directory (Code/Encoder):
python -m pip install -U pip
python -m pip install -U build twine scikit-build-core pybind11 numpy
python -m build
Artifacts will appear in dist/.
Check metadata:
twine check dist/*
Upload to PyPI
Recommended: upload to TestPyPI first.
# TestPyPI
python -m twine upload -r testpypi dist/*
# PyPI
python -m twine upload dist/*
You’ll need an API token configured in ~/.pypirc or exported via environment variables.
Building wheels for multiple platforms (recommended)
To avoid requiring end users to have a compiler + OpenCV dev libs, publish prebuilt wheels.
Typical approach: GitHub Actions + cibuildwheel.
High-level steps:
- Add
cibuildwheelworkflow - Build wheels for Linux (manylinux), macOS, Windows
- Upload wheels + sdist with
twine
If you want, I can add a ready-to-use GitHub Actions workflow for cibuildwheel.
Troubleshooting
If pip install ntsc-encoder succeeds but import ntsc_encoder fails, it usually means the wheel did not contain the compiled extension (or it was installed into the wrong location). For scikit-build-core, ensure CMakeLists.txt has install(TARGETS ntsc_encoder ... DESTINATION ${SKBUILD_PLATLIB_DIR}).
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 Distribution
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 ntsc_encoder-0.2.3.tar.gz.
File metadata
- Download URL: ntsc_encoder-0.2.3.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6353be48143806b9631904954417c8ce17d54128751474424492d99314dfb710
|
|
| MD5 |
5261871d9691341af0e98bffbc01b900
|
|
| BLAKE2b-256 |
f0fac89d787df1a0e9f055bd901d8155d4b5259ebd703539799b8abe1755ab7b
|
File details
Details for the file ntsc_encoder-0.2.3-cp314-cp314-macosx_26_0_arm64.whl.
File metadata
- Download URL: ntsc_encoder-0.2.3-cp314-cp314-macosx_26_0_arm64.whl
- Upload date:
- Size: 81.8 kB
- Tags: CPython 3.14, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7da7626ae0394c8d73237695be5876173e93643f05ea7273d57707d3a5fd2cbe
|
|
| MD5 |
8ede19b42100be0bed0423622407d22e
|
|
| BLAKE2b-256 |
17c8a8bbb07a49be7024357f53baf96f4babced82d3b61f1ca0d70844424e57f
|