Registry / http-networking / pyobjc-framework-coremedia

pyobjc-framework-coremedia

JSON →
library12.2.2pypypiunverified

PyObjC-framework-CoreMedia provides Python wrappers for Apple's CoreMedia framework on macOS. It is part of the larger PyObjC project, which creates a bidirectional bridge between Python and Objective-C. The library is actively maintained with frequent releases, often coinciding with new macOS SDKs and Python versions. It is currently at version 12.1 and requires Python 3.10 or newer.

pip install pyobjc-framework-coremedia
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-C
P
pyobjc-framework-coremedia
http-networkingpythonv12.2.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CoreMedia
import CoreMedia
The CoreMedia framework bindings are accessed directly via the 'CoreMedia' package name.
CMTime
from CoreMedia import CMTime

This example demonstrates importing the CoreMedia framework and creating a basic CMTime object, which is a fundamental structure for representing time in CoreMedia. It then prints some of its properties and converts it to seconds.

import CoreMedia # Create a CMTime object representing 10 seconds at a 600 timescale # CMTimeMake(value, timescale) -> CMTime time_value = CoreMedia.CMTimeMake(10 * 600, 600) print(f"CMTime object: {time_value}") print(f"Value: {time_value.value}") print(f"Timescale: {time_value.timescale}") print(f"Seconds: {CoreMedia.CMTimeGetSeconds(time_value)}")
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9. PyObjC 11.0 dropped support for Python 3.8. Users must update their Python environment to Python 3.10 or later.
fix
Upgrade Python to 3.10 or newer (current version 12.1 requires >=3.10).
affects: 11.0, 12.0
breakingBehavior for methods in the 'init' family changed in PyObjC 11.1 to correctly model that they steal a reference to `self` and return a new reference, aligning with `clang`'s Automatic Reference Counting documentation. This may affect custom initializers written in Python.
fix
Review custom `init` methods for correct reference handling according to ARC semantics, particularly if porting from older PyObjC versions.
affects: >=11.1
gotchaSeveral low-level C functions in CoreMedia, such as `CMBlockBufferAccessDataBytes` and `CMBlockBufferGetDataPointer`, are not directly usable from Python. Alternative functions like `CMBlockBufferCopyDataBytes` should be used instead.
fix
Consult PyObjC's API Notes for CoreMedia to identify unsupported C functions and their Python-compatible alternatives.
affects: All
gotchaWhen using `CMBlockBufferCreateWithMemoryBlock`, `CMBlockBufferCreateContiguous`, or `CMBlockBufferAppendMemoryBlock`, the `customBlockSource` argument *must* be `None` from Python. Providing a custom block source is not supported.
fix
Always pass `None` for `customBlockSource` when calling these specific `CMBlockBuffer` creation/modification functions.
affects: All
gotchaFrom PyObjC 12.1, Key-Value Observing (KVO) usage is automatically disabled for subclasses of `NSProxy` defined in Python. This prevents potential `SystemError` issues.
fix
Be aware that KVO will not function for `NSProxy` subclasses implemented in Python. Adjust design or use alternative observation mechanisms if this behavior is critical.
affects: >=12.1
gotchaIn PyObjC 10.3, support for calling `__init__` when a class or its superclass had a user-implemented `__new__` was temporarily removed, causing breaking changes for some projects. Version 10.3.1 reinstated this functionality.
fix
Ensure you are using PyObjC 10.3.1 or later if your code relies on `__init__` being called after a custom `__new__` implementation.
affects: 10.3 (fixed in 10.3.1)
Upgrade
Version history
12.2.2latest on PyPI · released Aug 11, 2026
Audit
Dependencies
pyobjc-corerequiredCore runtime for the PyObjC bridge, essential for all PyObjC framework wrappers.
pyobjc-framework-CocoaoptionalOften used alongside CoreMedia for applications, provides fundamental Cocoa classes like NSObject and NSApplication. While not strictly a direct dependency of *this specific wrapper*, it's a common practical dependency for many PyObjC applications that use media frameworks.
Agent activity
9 hits · last 30 days
node
6
Amazon
1
Resources
pyobjc-framework-coremedia — pip install pyobjc-framework-coremedia · libregistry