Code Monkey home page Code Monkey logo

muxy's Introduction

muxy

Django CI

RTMP-based streaming muxer for online events

Allows user to organize online self-streaming events, where each user can stream herself to public channels or other streaming services.

Requirements

  • Postgres
  • Python
  • nginx-rtmp

Install

Docker

The easiest way to get everything running quickly is by using Docker Compose.

Run:

docker compose up 

This will build Muxy and start the server, while also serving Postgres database service and nginx-rtmp.

Manual

Clone repository or download zipfile and extract somewhere.

Create virtual environment and activate:

python -m venv .venv
source .venv/bin/activate

Install the dependencies:

pip install -r requirements.txt

Initial configuration

Copy env.sample to .env and update if necessary. You should set at least:

  • SECRET_KEY: Use a unique random string.
  • ALLOWED_HOSTS: Add your hostname.
  • CORS_ALLOWED_ORIGINS: Add your request origin.
  • LANGUAGE_CODE: Set default language code.
  • TIME_ZONE: Set server time zone if different than UTC.
  • DB_PATH: Set path where to save database file

Now, run migrations to create and prepare database:

./manage.py migrate

Then, create a super user to enter admin panel:

./manage.py createsuperuser

Finally, collect static files for admin panel:

./manage.py collectstatic

Usage

If you are using Docker, just use docker compose up

Otherwise, to run server locally, use:

./manage.py runserver

Deploy

Read the deployment wiki page.

License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.

muxy's People

Contributors

munshkr avatar givo29 avatar dependabot[bot] avatar yaxu avatar highharmonics2 avatar

Stargazers

Adrian van Dongen avatar Elie Gavoty avatar Billy Bennett avatar Aidan Nelson avatar hobg0blin avatar Alvaro Obyrne avatar Daniel M Karlsson avatar David Granström avatar Andrew Grathwohl avatar Antonio avatar Olivia Jack avatar Alexandra Cárdenas avatar Karen Palacio avatar Nathan Chambrette ( Lehomar2vinci ) avatar Paul avatar Thomas Grund avatar  avatar ~lmn avatar Thales Grilo avatar Christof avatar Sean Stevens avatar Timo avatar ndr_brt avatar Scott Fradkin avatar Enock omondi avatar  avatar Bernard Gray avatar

Watchers

 avatar Scott Fradkin avatar Bernard Gray avatar

muxy's Issues

Feature / enhancement: expanded descriptions

Purpose: enable longer descriptions that can be used as content in the YouTube and Internet Archives.

Details:

  • Change label of current "Description" input to "Title"
  • Add an input field with a label of "Description detail". Allow for this as an extended field (maybe 1000 character limit?)
  • Modify backend storage so that the new description field can be extracted with the archive process

It's possible to reserve a slot multiple times

Using muxy-frontend, if you are an elite gamer and click super fast you can create multiple streams for the same slot. You then get multiple emails with different stream keys. This happened with three out of 144 people for the upcoming solstice stream.

[wishlist] User defined tags

As part of the registration process allow users to denote their own list of tags for their performance. These will be used during the archiving process to ensure that their performance video will be tagged accordingly.

Predefined Slots endpoints (SlotInterval)

An API endpoint for predefined slots: This would allow the frontend to easily see all free and occupied slots, while keeping the flexibility of the current Stream model.

SlotInterval

  • An Event has one or more SlotIntervals
  • A SlotInterval defines an interval (has a start and end datetime), and a fixed slot duration (eg. 20 minutes)
  • If not specified, an Event has a SlotInterval that spans the whole event
  • SlotInterval start and end datetime must be within its related Event start and end datetimes

A more secure mechanism for registering slots

Currently, using the API, anyone could see the users emails and anyone can add/remove slots. I’d like to implement something like @mashaal did on the web site, that is, when the user takes up a slot, the web site returns a auto-generated password/token that they can use to modify/remove their slot afterwards. That way, only the user that registered a slot can modify or remove it.

"Ovelaps with other streams" error when there is no overlap

Hey, just seeing some weird behaviour, I currently have these two empty streams in Muxy:
image

I'm trying to update some fields via a put request:

        fetch(muxyStream.url, {
            method: 'put',
            headers: new Headers({
                "Authorization": `Api-Key ${muxyApiKey}`,
                "Content-Type": "application/json",
                "Accept": "application/json"
            }),
            body: JSON.stringify({
                publisher_name: "joel",
                publisher_email: "[email protected]",
                description: "hello there",
                location: "Australia",
                timezone: "Australia/Sydney",
                event: "http://localhost:8000/events/1/",
                starts_at: muxyStream.starts_at,
                ends_at: muxyStream.ends_at
            })
        })

for which the payload looks like:

description: "hello there"
ends_at: "2021-12-01T06:00:00Z"
event: "http://localhost:8000/events/1/"
location: "Australia"
publisher_email: "[email protected]"
publisher_name: "joel"
starts_at: "2021-12-01T00:00:00Z"
timezone: "Australia/Sydney"

And I'm seeing this error returned:

{
   "non_field_errors":[
      "overlaps with other streams: ['Longest Night:  (2021-12-01 00:00:00+00:00 - 2021-12-01 06:00:00+00:00)']"
   ]
}

Which can't be the case, as there are no overlapping streams in my muxy instance.

Any ideas on why this might be happening?

Thanks,
Joel

Streams API results ordering

Some improvements @sfradkin asked:

  • Order the results array from earliest time to latest time: Right now it appears that all the entries in the json array are in reverse order.
  • Ordering the recordings array: There aren't too many instances where there's more than one recording file, but in the case that there are, it appears that the filenames are not in correct date order.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.