Git Product home page Git Product logo

streamz's Introduction

streamZ

A simple video streaming application made with Dart, JS, HTML, CSS & ❤️

Show some ❤️ by putting ⭐

Recently I wrote an article, explaining how to deploy it using systemd in LAN, which can be found here.

what does it do ?

  • A streaming service, intended to run in small network(s) ( may be in your home network ), which lets you stream movies to any device present in that network & having a standard browser installed ( yeah HTML5 support required )
  • Backend, fully written in Dart, leveraging power of dart:io & dart:isolate
  • Frontend, powered by HTML, CSS & last but not least Javascript ( yeah not using any UI framework )
  • Audio-Video playing is done using HTML5 <video> element, which can play mp4 & webm video(s) generally

how can I use it ?

  • If you're on Linux, then I've already compiled streamZ into an executable binary ( using dart2native compiler ), which can be simply run on any Linux Machine, cause that executable binary is one self-sufficient one ( but not yet platform-agnostic, which will change is near future ).
  • Then download this compressed file, and unzip it into a suitable location on your machine.
  • You'll get a directory tree like below
$ wget https://github.com/itzmeanjan/streamZ/releases/download/v1.0.1/streamZ.zip # consider downloading zip, using wget from terminal
$ cd
$ unzip streamZ.zip # unzipping it
$ cd streamZ # getting into actual directory
$ tree -h
.
├── [4.0K]  final
│   └── [7.8M]  streamZ
└── [4.0K]  frontend
    ├── [4.0K]  images
    │   └── [ 318]  favicon.ico
    ├── [4.0K]  pages
    │   └── [1.0K]  index.html
    ├── [4.0K]  scripts
    │   └── [9.7K]  index.js
    └── [4.0K]  styles
        └── [2.0K]  index.css

6 directories, 5 files
  • Now get into ./final directory & run executable binary, which will start a media streaming server on http://0.0.0.0:8000
$ cd final
$ ./streamZ # running movie steaming server
[+]streamZ_v1.0.0 listening ( streamZ0 ) ...

[+]streamZ_v1.0.0 listening ( streamZ1 ) ...
  • To check, open browser from same machine & type http://localhost:8000 into address bar, you'll get a list of all movies present under ~/Videos/ directory, which is default video storing directory on Linux running machines.
  • You can also access this streaming service by opening _http://x.x.x.x:8000/_,on any device's browser, present in LAN
  • Where x.x.x.x is nothing but Local IP Address of machine, running streamZ

  • If you want to dig deeper, simply fork this repo & clone it in you machine
  • Make sure you've installed Dart SDK & you're on *nix platform
  • Because I gonna use systemd.service to keep this streaming service alive in background, always, even after system restarts it'll auto start itself
  • You need to make sure, you've ~/Videos/ directory present on your system, cause we'll read from that directory ( every 30 minutes ), to ensure all mp4 & webm videos, present in aforementioned directory, are listed in movie playlist
  • If you're having a lot of traffic, consider using multiple Isolates to handle traffic efficiently. Just update int count = 2; on line 100 of ./bin/main.dart to whatever value you intend to use, that many Isolate(s) will be created on boot, they'll distributedly handle whole traffic coming in.
  • I've also written one systemd unit file, which can be used for deploying streamZ, so that it'll keep running always ( autostart after failure & system boot )
  • Consider using so, by modifying this systemd unit file

how does it look like ?

screenCapture_1

screenCapture_2

screenCapture_3

Feel free to check source code to dig deeper ( it's pretty well documented )

Hope it helps ... 😉

streamz's People

Contributors

itzmeanjan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.