This library provides Python wrappers for the macOS VideoToolbox framework, enabling access to its functionalities for video compression, decompression, and processing. It is part of the larger PyObjC project, which bridges Python and Objective-C, and typically sees releases aligned with macOS SDK updates.
pip install pyobjc-framework-videotoolboxVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and use a basic function from the VideoToolbox framework to list available video encoders on the system.
Upgrade to Python 3.10 or newer. If you must use Python 3.9, pin pyobjc-framework-videotoolbox to `<12.0`.
Upgrade to Python 3.9 or newer. If you must use Python 3.8, pin pyobjc-framework-videotoolbox to `<11.0`.
Review Python subclasses that implement `init` methods to ensure they correctly handle object ownership and ARC semantics, as incorrect handling can lead to memory leaks or premature deallocation.
If implementing custom `__new__` in an `objc.lookUpClass` or `objc.subclass` derived class, ensure `__init__` is explicitly called if needed. If using PyObjC's default `__new__`, be aware that `__init__` might be bypassed, requiring initialization logic to be handled elsewhere (e.g., in `__new__` or a class method).
Exercise caution when using PyObjC with free-threading in Python 3.13 or newer. Thoroughly test thread-safe operations, as the feature is experimental and may have unexpected interactions or stability issues.
Before using `os.fspath` with an `NSURL` instance, ensure it represents a local filesystem path. For other types of URLs, explicitly convert to a string representation if needed (e.g., `url.absoluteString()`) or access `url.path` for local paths.