{"id":49144379,"url":"https://github.com/umercodez/websocketcam","last_synced_at":"2026-06-14T12:01:21.053Z","repository":{"id":338829857,"uuid":"1159324143","full_name":"UmerCodez/WebsocketCAM","owner":"UmerCodez","description":"Access Android camera via WebSocket client API and run AI / computer vision tasks with ease on live camera stream","archived":false,"fork":false,"pushed_at":"2026-06-06T09:55:50.000Z","size":1866,"stargazers_count":59,"open_issues_count":3,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-06-06T11:21:11.996Z","etag":null,"topics":["ai-image-detection","android-camera","camera","camera-streamer","computer-vision","computer-vision-opencv","computer-vision-tools","image-processing","live-camera","live-image-recognition","object-detection","pose-detection","websocket"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UmerCodez.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-16T15:41:07.000Z","updated_at":"2026-06-06T10:03:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/UmerCodez/WebsocketCAM","commit_stats":null,"previous_names":["umercodez/websocketcam"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/UmerCodez/WebsocketCAM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FWebsocketCAM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FWebsocketCAM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FWebsocketCAM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FWebsocketCAM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UmerCodez","download_url":"https://codeload.github.com/UmerCodez/WebsocketCAM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FWebsocketCAM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34320273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["ai-image-detection","android-camera","camera","camera-streamer","computer-vision","computer-vision-opencv","computer-vision-tools","image-processing","live-camera","live-image-recognition","object-detection","pose-detection","websocket"],"created_at":"2026-04-22T02:34:24.480Z","updated_at":"2026-06-14T12:01:21.027Z","avatar_url":"https://github.com/UmerCodez.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Websocket CAM\n\n\u003cimg src=\"https://github.com/UmerCodez/WebsocketCAM/blob/main/assets/app-icon.png\" width=\"150\"\u003e\n\n![GitHub License](https://img.shields.io/github/license/UmerCodez/LittleRelay?style=for-the-badge) ![Android Badge](https://img.shields.io/badge/Android-7.0+-34A853?logo=android\u0026logoColor=fff\u0026style=for-the-badge) ![Jetpack Compose Badge](https://img.shields.io/badge/Jetpack%20Compose-4285F4?logo=jetpackcompose\u0026logoColor=fff\u0026style=for-the-badge) ![Material 3](https://img.shields.io/badge/Material%203-ebe89d?style=for-the-badge\u0026logo=materialdesign\u0026logoColor=white) ![GitHub Release](https://img.shields.io/github/v/release/UmerCodez/WebsocketCAM?include_prereleases\u0026style=for-the-badge)\n\n[\u003cimg src=\"https://github.com/UmerCodez/WebsocketCAM/blob/main/assets/gio-github.png\" height=\"80\"\u003e](https://github.com/UmerCodez/WebsocketCAM/releases) [\u003cimg src=\"https://github.com/UmerCodez/WebsocketCAM/blob/main/assets/gio-fdroid.png\" height=\"80\"\u003e](https://f-droid.org/packages/app.umerfarooq.websocketcam/) [\u003cimg src=\"https://github.com/UmerCodez/WebsocketCAM/blob/main/assets/gio-obtainium.png\" height=\"80\"\u003e](https://github.com/ImranR98/Obtainium)\n\n### Access Android camera using a WebSocket client API to perform real-time AI and computer vision tasks on a live video stream.\n\n\u003cimg src=\"https://github.com/UmerCodez/WebsocketCAM/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/WebsocketCAM/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg\" width=\"250\" heigth=\"250\"\u003e \n\n\u003c/div\u003e\n\nThe app broadcasts live camera frames as **JPEG** images over WebSocket connections, where each **JPEG** image is received as a **byte array** through the WebSocket’s `onMessage` callback. The app supports multiple client connections, enabling each client to independently perform AI or computer vision processing in parallel.\n\n### Features\n- Supports multiple websocket client connections\n- Change camera settings without restarting the Websocket Server\n- Access the live feed directly from a browser over the local network via browser's websocket client API (not browser's address bar)\n- No ads, no tracking and no data collection\n\n\n## Displaying live camera stream using Python\nA simple Python example using OpenCV and WebSocket libraries to connect to the WebSocket CAM app and display the live camera stream.\n\n```bash\npip install opencv-python numpy websocket-client\n```\n\n```python\nimport cv2\nimport numpy as np\nimport websocket\n\nSERVER_URL = \"ws://192.168.18.50:8080\" \n\ndef on_message(ws, message):\n    # Convert received bytes into numpy array\n    np_arr = np.frombuffer(message, np.uint8)\n\n    # Decode JPEG\n    frame = cv2.imdecode(np_arr, cv2.IMREAD_COLOR)\n\n    if frame is not None:\n        cv2.imshow(\"Camera Stream\", frame)\n        if cv2.waitKey(1) \u0026 0xFF == 27:  # ESC key to exit\n            ws.close()\n            cv2.destroyAllWindows()\n    else:\n        print(\"Failed to decode frame\")\n\ndef on_error(ws, error):\n    print(\"WebSocket error:\", error)\n\ndef on_close(ws, close_status_code, close_msg):\n    print(\"Connection closed:\", close_status_code, close_msg)\n    cv2.destroyAllWindows()\n\ndef on_open(ws):\n    print(\"Connected to Websocket CAM, open camera to see live stream\")\n\nif __name__ == \"__main__\":\n    websocket.enableTrace(False)\n    ws = websocket.WebSocketApp(\n        SERVER_URL,\n        on_open=on_open,\n        on_message=on_message,\n        on_error=on_error,\n        on_close=on_close,\n    )\n\n    try:\n        ws.run_forever()\n    except KeyboardInterrupt:\n        print(\"\\n Stopped by user\")\n        ws.close()\n        cv2.destroyAllWindows()\n```\n\nStart the WebSocket server in the app, then run the this Python script in **multiple terminals** to view **multiple live streams** simultaneously\n\n## Demo (Youtube)\nSee the demo on Youtube 👇\n\n[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/OIhSXAkaWBA/0.jpg)](https://www.youtube.com/watch?v=OIhSXAkaWBA)\n\n### Examples\nWorking examples of this app are availbe here [WebsocketCAM examples](https://github.com/UmerCodez/WebsocketCAM-examples)\n\n![Alt Text](https://github.com/UmerCodez/WebsocketCAM-examples/blob/main/assets/hand-keypoint-detection.gif) ![Alt Text](https://github.com/UmerCodez/WebsocketCAM-examples/blob/main/assets/Object-Detection.gif) ![Alt Text](https://github.com/UmerCodez/WebsocketCAM-examples/blob/main/assets/pose-detection.gif) ![Alt Text](https://github.com/UmerCodez/WebsocketCAM-examples/blob/main/assets/finger-drawing.gif) \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumercodez%2Fwebsocketcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumercodez%2Fwebsocketcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumercodez%2Fwebsocketcam/lists"}