OpenH264
H.264 through Cisco’s OpenH264 binary, downloaded on request.
OpenH264 Video Codec provided by Cisco Systems, Inc.
install() downloads Cisco’s prebuilt binary for macOS (x64, arm64), Linux (x64, arm64, glibc 2.34 or newer)
or Windows (x64), checks its SHA-256 and loads it.
Cisco’s patent license covers the binary only under the conditions of its license (see THIRD_PARTY_LICENSES.md).
The application must let its users enable and disable it, show NOTICE where they do, and reproduce
LICENSE where it presents licensing information.
- webrtc.openh264.LICENSE
Cisco’s license of the binary, which applications must reproduce where they present licensing information
- webrtc.openh264.NOTICE = 'OpenH264 Video Codec provided by Cisco Systems, Inc.'
The text Cisco’s license requires where users enable or disable H.264
- webrtc.openh264.VERSION = '2.6.0'
The OpenH264 release the extension is built against, and that
install()downloads
- webrtc.openh264.disable()
Stops offering H.264, until
install()is called again.OpenH264 Video Codec provided by Cisco Systems, Inc.
Connections created earlier keep their codecs. The binary stays in the cache.
- async webrtc.openh264.install(cache_dir=None, *, print_notice=True)
Enables H.264, downloading Cisco’s OpenH264 binary first if it isn’t cached.
OpenH264 Video Codec provided by Cisco Systems, Inc.
Calling it is the opt-in Cisco’s license requires, and it re-enables H.264 after
disable(). Call it before creating peer connections, because the codecs of a connection are fixed when it’s created. The download runs in a thread, so the event loop keeps running. It’s skipped when the binary is already in the cache.- Parameters:
cache_dir (
str, optional) – The directory the binary is kept in. Defaults toopenh264-<VERSION>in the cache directory. That isWRTC_CACHE_DIR, elsepython-webrtcinLOCALAPPDATAorXDG_CACHE_HOME, else~/.cache/python-webrtc.print_notice (
bool, optional) – Whether to printNOTICE. PassFalseonly when the application showsNOTICEitself where its users enable and disable H.264, as Cisco’s license requires.
- Returns:
str– The version of the loaded binary.- Raises:
RuntimeError – If Cisco has no binary for this platform (on Linux, it needs glibc 2.34 or newer), or it can’t be downloaded, doesn’t match its SHA-256, or can’t be loaded.
- Return type:
- webrtc.openh264.isEnabled()
Alias for
is_enabled()- Return type: