Skip to main content

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 uint8 array (e.g. produced by cv2.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:

  1. Add cibuildwheel workflow
  2. Build wheels for Linux (manylinux), macOS, Windows
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntsc_encoder-0.1.9.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntsc_encoder-0.1.9-cp314-cp314-macosx_26_0_arm64.whl (81.6 kB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

File details

Details for the file ntsc_encoder-0.1.9.tar.gz.

File metadata

  • Download URL: ntsc_encoder-0.1.9.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ntsc_encoder-0.1.9.tar.gz
Algorithm Hash digest
SHA256 8a056c8be2b2c3cf88c1c49e1d68afaa6c934380a48216e7b8e73919b9fc97b3
MD5 6927eb27e7e1e16acade8ba500c322f2
BLAKE2b-256 cba55af393e478f3f703c629ec30d8f582a9ada5e2a815e5df4c45b358d0d094

See more details on using hashes here.

File details

Details for the file ntsc_encoder-0.1.9-cp314-cp314-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for ntsc_encoder-0.1.9-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 8cbf1adae21c2f545b040b9182cd0128acec634bb3a809152ea4c8872c17a4f4
MD5 f4480fef647af8ffca9b941f24c0de03
BLAKE2b-256 40417e3e4b5489e0cc95b1da62a9ae3ddc5a5f6a23d86c939938d49774c2a1ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page