Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/tvPublic
forked fromalgora-io/tv

Open source Twitch for developers

License

NotificationsYou must be signed in to change notification settings

mazz/tv

 
 

Repository files navigation

Logo

Algora TV

The interactive livestreaming & video sharing service for developers.
Website ·Discord ·Twitter ·YouTube ·Issues

Open BountiesRewarded 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
  • PostgreSQL
  • FFmpeg
  • ImageMagick
  • 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

    Note: If you're using an Apple machine with an ARM-based chip, you need to install the Rust compiler and runmix compile.rambo

  3. Initialize your.env file

    cp .env.example .env
  4. Create the database user that will manage the database

    sudo -u postgres psql
    CREATEUSERalgora WITH PASSWORD'password';ALTERUSER algora WITH CREATEDB;\q

    Update the.env file as needed with the username and password you used.

  5. Set up and seed your database

    env$(cat .env| xargs -L 1) mix ecto.setup
  6. 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

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="..."RESUME_RTMP=true

Architecture

Overview

graph    Streamers{Streamers} --> Fly    Fly[Fly<br>Elixir App] --> RTMP    Fly --> Web[Phoenix<br>Web Server]    Fly --> Db[Fly<br>Postgres]    RTMP[Membrane<br>RTMP Server] -->|First mile delivery| Tigris[Tigris<br>Object Storage]    Viewers{Viewers} -->|Last mile delivery| Tigris    Viewers --> Fly
Loading

Livestream pipeline

graph    Encoder{Encoder<br>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 theAGPLv3 License. SeeLICENSE for more information.

Acknowledgements

Special thanks to these amazing projects which help power Algora TV:

About

Open source Twitch for developers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir87.5%
  • HTML9.1%
  • TypeScript2.1%
  • CSS0.5%
  • Dockerfile0.3%
  • Shell0.3%
  • Other0.2%

[8]ページ先頭

©2009-2025 Movatter.jp