{"id":15665290,"url":"https://github.com/cansik/open-azure-kinect","last_synced_at":"2026-02-01T16:31:25.174Z","repository":{"id":256598095,"uuid":"730901478","full_name":"cansik/open-azure-kinect","owner":"cansik","description":"Cross-platform Python playback library for Azure Kinect MKV files.","archived":false,"fork":false,"pushed_at":"2025-06-19T16:33:44.000Z","size":333,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T17:32:04.398Z","etag":null,"topics":["azure-kinect","playback","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cansik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-12T23:29:27.000Z","updated_at":"2025-06-19T16:33:00.000Z","dependencies_parsed_at":"2024-09-12T01:06:57.466Z","dependency_job_id":"784927d0-b9b8-4407-9a4a-a71cd8272dfb","html_url":"https://github.com/cansik/open-azure-kinect","commit_stats":null,"previous_names":["cansik/open-azure-kinect"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/cansik/open-azure-kinect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fopen-azure-kinect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fopen-azure-kinect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fopen-azure-kinect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fopen-azure-kinect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cansik","download_url":"https://codeload.github.com/cansik/open-azure-kinect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fopen-azure-kinect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28982631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T16:29:42.054Z","status":"ssl_error","status_checked_at":"2026-02-01T16:29:41.428Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-kinect","playback","python"],"created_at":"2024-10-03T13:45:36.017Z","updated_at":"2026-02-01T16:31:25.169Z","avatar_url":"https://github.com/cansik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Azure Kinect [![PyPI](https://img.shields.io/pypi/v/open-azure-kinect)](https://pypi.org/project/open-azure-kinect/)\n\nCross-platform Python playback library for Azure Kinect MKV files.\n\n![Calibration Example](assets/calib.jpg)\n\n*Calibration Example*\n\nIt is possible to playback [Azure Kinect](https://github.com/microsoft/Azure-Kinect-Sensor-SDK) videos files (mkv) without using the official SDK. This allows the software to be used on systems where the depth engine is not implemented, such as MacOS. The library currently **only** supports the **playback** of mkv files and does **not provide direct access** to the Azure Kinect device.\n\nThe following functions are currently supported:\n\n- [x] Reading colour, infrared and depth stream from mkv\n- [x] Reading and parsing calibration data from mkv\n- [x] Image alignment and point transformation (⚠️ maybe not as accurate as the Azure Kinect SDK)\n\n## Installation\n\n```terminal\npip install open-azure-kinect\n```\n\n## Usage\nIn order to load an MKV file, it is necessary to create a new instance of the `OpenK4APlayback` class. Note that if the `is_looping` flag is set, the stream will not stop playing at the EOF of the stream. It will automatically close and reopen the file.\n\n```python\nfrom openk4a.playback import OpenK4APlayback\n\nazure = OpenK4APlayback(\"my-file.mkv\")\nazure.is_looping = True # set loop option if necessary\nazure.open()\n```\n\nAfter that, it is possible to read the available stream information.\n\n```python\nfor stream in azure.streams:\n    print(stream)\n\n# print clip duration\nprint(azure.duration_ms)\n```\n\nAnd read the actual capture information (image data).\n\n```python\nwhile capture := azure.read():\n    # read color frame as numpy array\n    color_image = capture.color\n\n    # print current timestamp in ms (of the video timeline)\n    print(azure.timestamp_ms)\n```\n\n### Seek\nWith `seek(timestamp_ms: int)` it is possible to jump to a specific position in the video. The current implementation is not very efficient as the library just skips frames until the timestamp is reached. In the future, this should be replaced with a ffmpeg controlled seek.\n\n```python\n# jump +1 second into the future\nazure.seek(azure.timestamp_ms + 1000)\n```\n\n### Calibration Data\nTo access the calibration data of the two cameras (`Color`, `Depth`), use the parsed information property.\n\n```python\ncolor_calib = azure.color_calibration\ndepth_calib = azure.depth_calibration\n```\n\n### Image and Point Transformations\nThe class `CameraTransform` handles the transformation task between the different cameras.\n\n⚠️ Be aware that this part of the framework is still under development! Please open a PR if you like to improve it.\n\n```python\nimport numpy as np\n\nfrom openk4a.transform import CameraTransform\n\ntransform = CameraTransform(azure.color_calibration, azure.depth_calibration)\n\n# transform points from color to depth image (using epipolar search)\ndepth_points = transform.transform_2d_color_to_depth(np.array([[300, 400], [200, 200]]))\n\n# create 3d pointcloud from depthmap\npoints_3d = transform.create_pointcloud(depth_map)\n\n# transform color image into depth image\ntransformed_color = transform.align_image_color_to_depth(color, depth_map)\n```\n\n## Examples\nPlease find more templates on how to use this library in the [examples](https://github.com/cansik/open-azure-kinect/tree/main/examples) folder.\n\n## Development and Examples\nTo run the examples or develop the library please install the `dev-requirements.txt` and `requirements.txt`.\n\n```terminal\npip install -r dev-requirements.txt\npip install -r requirements.txt\n```\n\nThere is already an example script [demo.py](demo.py) which provides insights on how to use the library.\n\n## About\nThanks to [tikuma-lsuhsc](https://github.com/tikuma-lsuhsc) for creating [python-ffmpegio](https://github.com/python-ffmpegio/python-ffmpegio) and helping me extract the Azure Kinect data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcansik%2Fopen-azure-kinect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcansik%2Fopen-azure-kinect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcansik%2Fopen-azure-kinect/lists"}