Last active
March 17, 2024 13:30
-
-
Save sophiawisdom/d203309814044771fbc61474be467cd6 to your computer and use it in GitHub Desktop.
First, `pip3 install PyObjc`, then run this script!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VideoToolbox | |
| for variable in dir(VideoToolbox): | |
| # https://developer.apple.com/documentation/coremedia/1564239-video_codec_constants?language=objc | |
| if not variable.startswith("kCMVideoCodecType_"): continue | |
| num = getattr(VideoToolbox, variable) | |
| # https://twitter.com/never_released/status/1769353248484258158 | |
| VideoToolbox.VTRegisterSupplementalVideoDecoderIfAvailable(num) | |
| # https://developer.apple.com/documentation/videotoolbox/2887343-vtishardwaredecodesupported?language=objc | |
| print(f"{variable[18:]}:\t{VideoToolbox.VTIsHardwareDecodeSupported(num)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment