Code Monkey home page Code Monkey logo

zomstream's Introduction

ZomStream

Zomstream is a web frontend for streaming video. We wrote it as we needed a overview of the running streams on our nginx-rtmp Server.

It is written in python and based on the flask microframework and does not need any databases or other external Services. It does not store any persistent data and its only configuration are some parameters in the docker compose file and a simple configuration file for the webfrontend.

This repository does contain all needed components for a "streaming server in a box" Setup.

Credits

Components

Zomstream is a multiple container setup which should be setup using docker-compose. It consists of the following components.

nginx-rtmp

nginx webserver with rtmp patches.

this does run the actual streaming, receives rtmp streams from OBS / ffmpeg etc. and provides the streams in hls or dash format for web based players.

auth

this is a simple PSK based authentication module to provide authentication for source connections.

frontend

this components provides the visible website containing a overview of the running streams, rtmp links for external players and a web based video player to watch the livestreams.

How to use this

We tested this with OBS and ffmpeg but any steaming source supporting rtmp should work just fine.

With ffmpeg:

ffmpeg -re -f lavfi -i testsrc -c:v libx264 -b:v 160k -preset ultrafast -b:a 90k -c:a libfdk_aac -b:a 12k -s 1920x1080 -x264opts keyint=50 -g 25 -pix_fmt yuv420p -f flv "rtmp://yourserver.com/live/yourstreamname?pass=12345678"

Setup instructions

  • clone the repository
  • copy the file frontend/config.example.yml to frontend/config.yml
  • modify this configuration file (especially the parameters rtmp_base, base_url and web_proto)
  • copy the docker-compose.default.yml to docker-compose.yml
    • uncomment the traefik parameters or the port forward of port 8080 of the webserver depending on your setup
    • set the PSK stream password in the password environment variable of the auth container.
  • run docker-compose up -d to build and start the containers

Example Setup using OBS:

  • Go to "Settings" -> "Stream"
  • Set the "Stream Type" to "Custom Streaming Server"
  • enter your Hostname or IP and the Service "live" in the URL Field
    • example: rtmp://127.0.0.1/live
  • Enter your desired Streamname and the Authentication Information for the auth container in the "Stream Key" field
    • example: stream?pass=password1234

zomstream's People

Contributors

z-bsod avatar

Watchers

Josep Maria Viñolas Auquer avatar

Forkers

sixohsix

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.