{"id":22261869,"url":"https://github.com/jsonfm/camio","last_synced_at":"2026-05-01T10:32:13.408Z","repository":{"id":137719801,"uuid":"430908557","full_name":"jsonfm/camio","owner":"jsonfm","description":"Camera devices manage with opencv based on threading and callbacks.","archived":false,"fork":false,"pushed_at":"2022-02-05T01:47:58.000Z","size":452,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T13:47:11.671Z","etag":null,"topics":["callbacks","opencv","python","threading"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsonfm.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}},"created_at":"2021-11-23T00:29:10.000Z","updated_at":"2022-02-05T01:48:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"83633925-021a-4b41-b74a-c9609f928f24","html_url":"https://github.com/jsonfm/camio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jsonfm/camio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fcamio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fcamio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fcamio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fcamio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsonfm","download_url":"https://codeload.github.com/jsonfm/camio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fcamio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32494270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["callbacks","opencv","python","threading"],"created_at":"2024-12-03T09:14:42.117Z","updated_at":"2026-05-01T10:32:13.380Z","avatar_url":"https://github.com/jsonfm.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python-CamIO\n![docs](https://img.shields.io/badge/Docs-Mkdocs-blue) \u003cbr\u003e\nA library to handle multiple cameras with opencv, based on threading and callbacks.\n\n\n## Single Camera\nYou could use a single camera with callbacks to do some image/video processing:\n```python\nfrom camio import Camera\n\n\ndef proccesVideo(frame):\n    print(frame.shape)\n    # Do some video processing\n    # Or displays the frame\n    # .\n    # .\n\n\n# Instance a camera object\ncamera = Camera(src=0, fps=10)\n\n# Setup callbacks\ncamera.on('frame-ready', proccesVideo)\n\n# Start read loop in another thread\ncamera.start()\n```\n\n## Multiple Cameras\nAlso, camIO can manage multiple cameras at the same time:\n\n```python\nfrom camio import Cameras\n\n\ndef frameAvailable(device):\n    \"\"\"Multiple cameras manager callback.\"\"\"\n    print(f\"{device} has a new frame available\")\n\n\n# Create a list of cameras with their corresponding sources\ncamerasAdmin = Cameras(devices={\n    'camera1': 0,\n    'camera2': 1\n}, fps=5, reconnectDelay=5)\n\n# Setup Callbacks\ncamerasAdmin.on('frame-available', frameAvailable)\n\n# Starts all read loops for cameras in differents threads\ncamerasAdmin.startAll()\n\n\n```\nAnd here are some extra functions for manage multiple cameras:\n```python\n\nfrom camio import Cameras\n\ncamerasAdmin = Cameras(devices={\n    # 'deviceName': src\n    'camera1': 0, \n    'camera2': 1\n}, fps=5, reconnectDelay=5)\n\n# Start all devices at once on separate threads\ncamerasAdmin.startAll()\n\n...\n\n# Start one single device on a separate thread\ncamerasAdmin.startOnly('camera1')\n\n# After of starting all devices you can do other tasks\nmy_tasks()\n\n...\n\n# get a frame of a specific device\nframe = camerasAdmin.getFrameOf('camera1')\n\n...\n\n# Get a list of all frames\nframes = camerasAdmin.getAllFrames()\n\n...\n\n# Pause All devices\ncamerasAdmin.pauseAll()\n\n...\n\n# Resume All devices\ncamerasAdmin.resumeAll()\n\n...\n\n# Pause one specific device\ncamerasAdmin.pauseOnly('camera1')\n\n# Resume one specific device\ncamerasAdmin.resumeOnly('camera1')\n\n...\n\n# Update all FPS(s) speed\ncamerasAdmin.setSpeed(fps=12)\n\n# Update one specific FPS speed\ncamerasAdmin.setSpeedOnly('camera1', fps=5)\n\n```\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonfm%2Fcamio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsonfm%2Fcamio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonfm%2Fcamio/lists"}