Code Monkey home page Code Monkey logo

streamsink.go's Introduction

StreamSink.Go

Build Status

StreamSink is an automated streaming recording server written in Go, which exposes a REST API. It also manages the recorded catalogue, creates previews and has an API for cutting the recorded videos.

Which streaming services are supported? Just look at the youtubedl youtube-dl supported sites

The server will automatically keep checking streams and start recording them, once they are online. When streams have finished or have been paused by the used, they will be added to the catalogue.

A Vue client StreamSink.Vue is provided as a UI.

Setup

You need to run the client and server separately in order to use the application.

Server

The application is primarily crafted for Linux but also has code paths specifically for Windows but still does not work well on Windows, due to process communication issues. So, it is recommended to use Linux, since process management works on Linux.

The server requires that four applications being accessible from the environment: ffmpeg, ffprobe, youtubedl. All are available for Linux and Windows. Below are more specific descriptions for a setup.

You can also use docker, but since ffmpeg is used with high CPU usage, you might want to run a native server instance.

Config

The server has one config file under conf/app.yml which must provide the listed values. You can copy the default conf.app.default.yml to conf.app.yml.

Client

A UI for the server is provided at, and can be deploy with the

Linux

You can install all required applications via the default packet manager, but it is recommended to compile ffmpeg from source, since the repo version of distros are typically far behind. However, you can still use the maintainer's version without any problem.

A setup script setup.sh is provided and installs all needed packages under Ubuntu and Debian and also compiles ffmpeg from source.

Windows

The server uses SQLite3 for storage and Go requires specific build tools in order to compile on Windows:

  1. Install gcc from here http://tdm-gcc.tdragon.net/download
  2. Install the font under assets/..
  3. Download ffmpeg and place it into the global system path

Issue with Windows

The server needs read and execute permissions on processes on Windows. It is also not enough to run the application as administrator, although it will work without these permissions, Windows will cause an and error exit code 255 (insufficient permission to manage process).

Run Test

go test ./...

Notes & Limitations

  1. All streaming services allow only a limited number of request made by each client. If this limit is exceeded the client will be temporarily or permanently blocked. In order to circumvent this issue, the application does strictly control the timing between each request. However, this might cause that the recording will only start recording after a few minutes and not instantly.
  2. The system has disaster recovery which means that if the system crashes during recordings, it will try to recover all recordings on the next launch. However, due to the nature of streaming videos and the crashing behavior, the video files might get corrupted. In this case they will be automatically delete from the system, after they have been checked for integrity. Otherwise, they are added to the library.

streamsink.go's People

Contributors

srad avatar

Watchers

 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.