{"id":18000113,"url":"https://github.com/edwardjxli/wormhole","last_synced_at":"2025-03-28T10:33:38.709Z","repository":{"id":53856953,"uuid":"518987039","full_name":"EdwardJXLi/Wormhole","owner":"EdwardJXLi","description":"A Simple and Hackable Realtime Video Streaming Engine for Prototypes and Projects Alike!","archived":true,"fork":false,"pushed_at":"2022-11-22T22:25:17.000Z","size":36025,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T05:45:16.494Z","etag":null,"topics":["camera-streaming","http-live-streaming","opencv","python","python-video-streaming","realtime","sockets","streaming","video","video-streaming","video-streaming-server"],"latest_commit_sha":null,"homepage":"","language":"Python","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/EdwardJXLi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-28T20:33:40.000Z","updated_at":"2025-02-02T03:45:23.000Z","dependencies_parsed_at":"2022-08-23T18:30:26.915Z","dependency_job_id":null,"html_url":"https://github.com/EdwardJXLi/Wormhole","commit_stats":null,"previous_names":["radioactivehydra/wormhole"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdwardJXLi%2FWormhole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdwardJXLi%2FWormhole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdwardJXLi%2FWormhole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdwardJXLi%2FWormhole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdwardJXLi","download_url":"https://codeload.github.com/EdwardJXLi/Wormhole/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246012867,"owners_count":20709528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["camera-streaming","http-live-streaming","opencv","python","python-video-streaming","realtime","sockets","streaming","video","video-streaming","video-streaming-server"],"created_at":"2024-10-29T23:09:40.385Z","updated_at":"2025-03-28T10:33:33.700Z","avatar_url":"https://github.com/EdwardJXLi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[HTMLElementBegin]: # \n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/RadioactiveHydra/Wormhole/raw/main/wormhole/assets/logo_white.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/RadioactiveHydra/Wormhole/raw/main/wormhole/assets/logo.svg\"\u003e\n  \u003cimg alt=\"Wormhole Logo\" src=\"https://github.com/RadioactiveHydra/Wormhole/raw/main/wormhole/assets/logo.svg\"\u003e\n\u003c/picture\u003e\n\n[HTMLElementEnd]: # \n\n# Wormhole: Realtime Streaming Engine\nWormhole is a simple and hackable realtime video streaming engine for prototypes and projects alike! Stream amera feeds, video files, or machine learning output from anything like a Raspberry Pi to a fully fledged development environment!\n\n\n![wormhole_screenshot_spring](https://user-images.githubusercontent.com/20020059/184041754-5ee78d89-6796-49b8-87b7-13792c301d83.jpg)\n\n\u003e ## Try Out A Live Demo Here: https://demo.wormhole.hydranet.dev/\n\n## Features:\n- Multithreaded Flask \u0026 SocketIO backend\n- Camera and Video File Streaming!\n- Fast and scalable Motion JPEG and PNG streaming\n- Dynamic protocol negotiation between Wormhole servers and clients\n- Dynamic video modification through callbacks and views\n\n## What is Wormhole?\nWormhole is not meant to overtake established battle-tested libraries such as WebRTC or alike. Instead, Wholehole aims to be an extremely simple-to-use library wherever you need to share video (Pre-recorded or live from a camera) between two or more servers. The original design goal was so that Wormhole could be utilized during fast-paced development environments such as hackathons and other competitions, yet flexible and modular enough to be a one-stop-shop for your next AI video processing project, webcam streaming project, or simple video sharing project. From a Raspberry Pi camera server to annotated output from a Machine Learning pipeline, Wormhole can fit all your needs!\n\n## Installing Wormhole\nTo get started with Wormhole, you can just clone the project by running `git clone git@github.com:RadioactiveHydra/Wormhole.git` to your local machine.\nOnce downloaded, run `pip install -r wormhole/requirements.txt` to install all the required dependencies.\n\u003e NOTE: It is recommended that you install Wormhole in a virtual env! More instructions can be found [here](https://www.freecodecamp.org/news/how-to-setup-virtual-environments-in-python/)\n\n## Getting Started with Wormhole\n\u003e NOTE: This is still WIP! API may change and/or be removed in future releases.  \n\nTo start streaming from your camera, all you need to write is:\n```py\nfrom wormhole import Wormhole\nserver = Wormhole()\nserver.stream(0)\nserver.join()\n```\n\n**Thats It!** Wormhole then handles setting up the server, launching the camera, and streaming the video frames!\nTo stream from a video file instead, you can write the following:\n```py\nfrom wormhole import Wormhole\nserver = Wormhole()\nserver.stream(\"path/to/video.mp4\")\nserver.join()\n```\n\nAs easy as that! To view the video stream in another python project, you can just run:\n```py\nfrom wormhole import Wormhole\nvideo = Wormhole().view(\"your.ip.address.here\")\n```\n\nAgain, **thats it!** Wormhole then handles setting up the client, negotiating the best streaming protocol to use, and viewing the video stream! To render the video to your screen, you can then run:\n```py\nfrom wormhole.utils import render_video\nrender_video(video)\n```\nThe video stream is also available online if you go to `http://localhost:5000/wormhole/stream/default/mjpeg` in your browser.\n\nOf course, you may want to do more than what Wormhole offers by default. For that, you can check out some examples in the `examples` folder or in the [Official Wormhole Example Server](https://github.com/EdwardJXLi/WormholeExampleServer)\n\n## Why develop Wormhole?\nAfter rewriting the same video streaming codebase for the 5th hackathon/project in a row ([Ref.1](https://github.com/CrowdEye/crowdeye-ai-engine/blob/bbb1591cbc121babef8de973ba7210fe358683ba/ai.py#L57)) ([Ref.2](https://github.com/MaskPass-BellCSclub/ai-server/blob/1d9acdc36677fa433a0f3db2c2d297fe023c0d70/main.py#L199)) ([Reg.3](https://github.com/Hive-HQ/Hive-HQ-backend/blob/27f88a2a74da9465f8fc1ceb89fd0344d696a8cc/main.py#L526)) (\u0026 More!), I thought it was time to sit down and write a universal streaming library for all my needs. Shopping around online did not yield any projects that fit my requirements, so I decided to build my own. Wormhole is designed so that it can not only be deployed in ~~minutes~~ **seconds**, but it is also flexible enough to do everything I need in a fully-fledged data streaming library. \n\n## Contributing to Wormhole\nWormhole's source code follows all **PEP8** guidelines (except E501 for long lines). Also, most function arguments are **typed** so that the API is coherent and easy-to-use. Finally, Wormhole aims to keep compatibility for **Python versions 3.8 and beyond**. To contribute to Wormhole, you can either fork the project on GitHub or submit a pull request. If you have any questions or suggestions, feel free to join the discord server here: [https://discord.gg/9QF2bPc](https://discord.gg/9QF2bPc).\n\n[HTMLElementBegin]: # \n## Powered By Wormhole Assets\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/RadioactiveHydra/Wormhole/raw/main/wormhole/assets/poweredby_white.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/RadioactiveHydra/Wormhole/raw/main/wormhole/assets/poweredby.svg\"\u003e\n  \u003cimg alt=\"Powered By Wormhole\" src=\"https://github.com/RadioactiveHydra/Wormhole/raw/main/wormhole/assets/poweredby.svg\"\u003e\n\u003c/picture\u003e\n\n[HTMLElementEnd]: # \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwardjxli%2Fwormhole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedwardjxli%2Fwormhole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedwardjxli%2Fwormhole/lists"}