Crate rustream

source ·
Expand description

§RuStream

made-with-rust

crates.io

build none-shall-pass

§Summary

RuStream is a self-hosted streaming engine, that can render videos via authenticated sessions.

§Usage

Download OS specific Executable
§macOS
curl -o RuStream-Darwin-x86_64.tar.gz -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/RuStream/releases/latest/download/RuStream-Darwin-x86_64.tar.gz"
§Linux
curl -o RuStream-Linux-x86_64.tar.gz -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/RuStream/releases/latest/download/RuStream-Linux-x86_64.tar.gz"
§RaspberryPi
curl -o RuStream-RaspberryPi.tar.gz -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/RuStream/releases/latest/download/RuStream-RaspberryPi.tar.gz"
§Windows
curl -o RuStream-Windows-x86_64.zip -LH "Accept: application/octet-stream" "https://github.com/thevickypedia/RuStream/releases/latest/download/RuStream-Windows-x86_64.zip"
Add to existing project
§Sample main.rs
use rustream;

#[actix_rt::main]
async fn main() {
    match rustream::start().await {
        Ok(_) => {
            println!("RuStream session terminated")
        }
        Err(err) => {
            eprintln!("Error starting rustream: {}", err)
        }
    }
}
§Arguments
  • debug - Enable debug level logging
§Flags
  • --filename / -f - Filename (JSON) for the secrets config
  • --version / -v - Get package version
§Config file

RuStream requires a JSON file with secrets loaded as key-value paris.

Sample content of JSON file
{
  "authorization": {"rustic":  "S0m3rAn0mP@ssW0rD"},
  "video_source": "/Users/hannibal/Downloads/stream",
  "video_port": 5883,
  "file_formats": ["mov", "mp4", "mkv"],
  "workers": 10
}

§Linting

§Requirement

rustup component add clippy

§Usage

cargo clippy --no-deps --fix --allow-dirty

§Docs

§Cargo Docs

cargo doc --document-private-items --no-deps
§GitHub Wiki

§Crate

https://crates.io/crates/RuStream

© Vignesh Rao

Licensed under the MIT License

Modules§

  • constant 🔒
    Module to load all the static values and required structs during startup.
  • jinja 🔒
    Module to read the HTML files and load as Jinja templates.
  • routes 🔒
    Module for all the API entry points.
  • squire 🔒
    Module to store all the helper functions.
  • templates 🔒
    Module to load all the templates for the UI.

Functions§

  • Contains entrypoint and initializer settings to trigger the asynchronous HTTPServer