{"id":18011232,"url":"https://github.com/flavioribeiro/donut","last_synced_at":"2025-04-05T21:07:35.961Z","repository":{"id":62867386,"uuid":"556476475","full_name":"flavioribeiro/donut","owner":"flavioribeiro","description":"donut is a zero setup required SRT+MPEG-TS -\u003e WebRTC Bridge powered by Pion.","archived":false,"fork":false,"pushed_at":"2024-06-07T09:58:39.000Z","size":4877,"stargazers_count":357,"open_issues_count":5,"forks_count":13,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-29T19:07:42.266Z","etag":null,"topics":["608","cea608","h264","live-streaming","srt","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flavioribeiro.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":"2022-10-23T23:37:58.000Z","updated_at":"2025-01-04T20:16:06.000Z","dependencies_parsed_at":"2024-02-25T02:28:48.533Z","dependency_job_id":"2679834e-86f4-447c-bd11-93608205b568","html_url":"https://github.com/flavioribeiro/donut","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavioribeiro%2Fdonut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavioribeiro%2Fdonut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavioribeiro%2Fdonut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavioribeiro%2Fdonut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flavioribeiro","download_url":"https://codeload.github.com/flavioribeiro/donut/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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":["608","cea608","h264","live-streaming","srt","webrtc"],"created_at":"2024-10-30T03:07:40.938Z","updated_at":"2025-04-05T21:07:35.937Z","avatar_url":"https://github.com/flavioribeiro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg src=\"https://user-images.githubusercontent.com/244265/200068510-7c24d5c7-6ba0-44ee-8e60-0f157f990b90.png\" width=\"350\" /\u003e\n\n**donut** is a zero setup required [SRT](https://en.wikipedia.org/wiki/Secure_Reliable_Transport) (_MPEG-TS_) and [RTMP](https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol) to [WebRTC](https://webrtc.org/) bridge powered by [Pion](http://pion.ly/).\n\n# HOW IT WORKS\n\n```mermaid\nsequenceDiagram\n    actor User\n\n    box Cornsilk\n        participant browser\n    end\n\n    User-\u003e\u003e+browser: input protocol, host, port, id, and opts\n    User-\u003e\u003e+browser: click on [Connect]\n    \n    Note over donut,browser: WebRTC connection setup\n    \n    browser-\u003e\u003e+browser: create WebRTC browserOffer\n    browser-\u003e\u003e+donut: POST /doSignaling {browserOffer}\n\n    donut-\u003e\u003e+browser: reply WebRTC {serverOffer}\n\n    Note over donut,browser: WebRTC connection setup\n\n    loop Async streaming\n        donut--)streaming server: fetchMedia\n        donut--)donut: ffmpeg::libav demux/transcode\n        donut--)browser: sendWebRTCMedia\n        browser--)browser: render audio/video frames\n        User--)browser: watch media\n    end\n```\n\n![donut docker-compose setup](/.github/docker-compose-donut-setup.webp \"donut docker-compose setup\")\n\nref: [how donut works](/HOW_IT_WORKS.md)\n\n# QUICK START\n\nMake sure you have the `ffmpeg 5.x.x`. You must configure the CGO library path pointing it to **ffmpeg 5**.\n\n```bash\nexport CGO_LDFLAGS=\"-L/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/lib/\"\nexport CGO_CFLAGS=\"-I/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/include/\"\nexport PKG_CONFIG_PATH=\"/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/lib/pkgconfig\"\n```\n\nNow you can install and run it:\n\n```bash\ngo install github.com/flavioribeiro/donut@latest\ndonut\n```\n\nHere are specific instructions [to run on MacOS](/MAC_DEVELOPMENT.md).\n\n# RUN USING DOCKER-COMPOSE\n\nAlternatively, you can use `docker-compose` to simulate an [SRT live transmission and run the donut effortless](/DOCKER_DEVELOPMENT.md).\n\n```bash\nmake run\n```\n\n## OPEN THE WEB UI\nOpen [http://localhost:8080/demo](http://localhost:8080/demo). You will see two text fields. Fill them with the your streaming info and hit connect.\n\n![donut docker-compose setup](/.github/docker-compose-donut-setup.webp \"donut docker-compose setup\")\n\n### FAQ\n\nPlease check the [FAQ](/FAQ.md) if you're facing any trouble.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavioribeiro%2Fdonut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflavioribeiro%2Fdonut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavioribeiro%2Fdonut/lists"}