https://github.com/algora-io/tv Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} algora-io / tv Public * Notifications You must be signed in to change notification settings * Fork 17 * Star 423 Open source Twitch for developers algora.tv License AGPL-3.0 license 423 stars 17 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 13 * Pull requests 3 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights algora-io/tv This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 209 Commits assets assets config config lib lib priv priv rel rel scripts scripts test test .credo.exs .credo.exs .dockerignore .dockerignore .env.example .env.example .formatter.exs .formatter.exs .gitignore .gitignore .iex.exs .iex.exs Dockerfile Dockerfile LICENSE LICENSE README.md README.md fiex fiex fly.toml fly.toml mix.exs mix.exs mix.lock mix.lock observer observer View all files Repository files navigation * README * AGPL-3.0 license Logo Algora TV The interactive livestreaming & video sharing service for developers. Website * Discord * Twitter * YouTube * Issues Open Bounties Rewarded Bounties New feature: Earn with Livestream Billboards! Algora Live Billboards allow for in-video ads, helping devs earn money while livestreaming and giving devtools companies a novel channel to reach new audiences. Learn more LiveBillboards.mp4 Getting Started To get a local copy up and running, follow these steps. Prerequisites * Elixir and Erlang/OTP + We recommend using asdf to install Elixir and Erlang/OTP. + Keep in mind that each Elixir version supports specific Erlang/OTP versions. + Make sure you have at least Elixir 1.12 installed to run Algora TV. * PostgreSQL * FFmpeg * OBS Studio (recommended for testing livestreaming features) Setting up the project 1. Clone the repo and go to the project folder git clone https://github.com/algora-io/tv.git; cd tv 2. Fetch dependencies mix deps.get 3. Initialize your .env file cp .env.example .env 4. Create your database sudo -u postgres psql CREATE USER algora WITH PASSWORD 'password'; CREATE DATABASE tv; GRANT ALL PRIVILEGES ON DATABASE tv TO algora; 5. Paste your connection string into your .env file DATABASE_URL="postgresql://algora:password@localhost:5432/tv" 6. Set up your database and run migrations env $(cat .env | xargs -L 1) mix ecto.setup 7. Start your development server env $(cat .env | xargs -L 1) iex -S mix phx.server Setting up external services Some features of Algora TV rely on external services. If you're not planning on using these features, feel free to skip setting them up. GitHub GitHub is used for authenticating users. Create a GitHub OAuth app and set * Homepage URL: http://localhost:4000 * Authorization callback URL: http://localhost:4000/oauth/callbacks /github Once you have obtained your client ID and secret, add them to your .env file. GITHUB_CLIENT_ID="" GITHUB_CLIENT_SECRET="..." Tigris Tigris is used for storing and delivering livestreams and other media. Create a public Tigris bucket to obtain your secrets and add them to your .env file. AWS_ENDPOINT_URL_S3="https://fly.storage.tigris.dev" AWS_REGION="auto" AWS_ACCESS_KEY_ID="tid_..." AWS_SECRET_ACCESS_KEY="tsec_..." BUCKET_MEDIA="..." Architecture Overview graph Streamers{Streamers} --> Fly Fly[Fly
Elixir App] --> RTMP Fly --> Web[Phoenix
Web Server] Fly --> Db[Fly
Postgres] RTMP[Membrane
RTMP Server] -->|First mile delivery| Tigris[Tigris
Object Storage] Viewers{Viewers} -->|Last mile delivery| Tigris Viewers --> Fly Loading Livestream pipeline graph Encoder{Encoder
e.g. OBS} -->|RTMP| Source[FLV Demuxer] Source -->|video| H264Parser[H264 Parser] Source -->|audio| AACParser[AAC Parser] H264Parser --> H264Payloader[H264 Payloader] AACParser --> AACPayloader[AAC Payloader] H264Payloader --> CMAFMuxerVideo[CMAF Muxer] AACPayloader --> CMAFMuxerAudio[CMAF Muxer] CMAFMuxerVideo --> fMP4 CMAFMuxerAudio --> fMP4 fMP4[Fragmented MP4] -->|HLS| Tigris{Tigris Object Storage} Loading License Distributed under the AGPLv3 License. See LICENSE for more information. Acknowledgements Special thanks to these amazing projects which help power Algora TV: * Tigris * Fly.io * Phoenix Framework * Ecto * Membrane * FFmpeg * Tailwind CSS About Open source Twitch for developers algora.tv Topics video hls rtmp elixir-phoenix video-sharing livestreaming Resources Readme License AGPL-3.0 license Activity Custom properties Stars 423 stars Watchers 7 watching Forks 17 forks Report repository Releases No releases published Packages 0 No packages published Languages * Elixir 83.9% * HTML 12.8% * TypeScript 1.9% * Dockerfile 0.4% * Shell 0.4% * CSS 0.4% * Other 0.2% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.