Giter Club home page Giter Club logo

go-homelab-cable's Introduction

go-homelab-cable

KHLC - Homelab Cable

A Go application for playing media in your homelab the way a television station would. Set up multiple "channels" within your network, each of which continuously play through a list of local media files at random.

Dependencies

Only tested on linux machines, requires VLC and LibVLC.

sudo apt install vlc libvlc-dev

Quick Start

Start the Server

  1. Sync this repo
  2. go run cmds/cli/main.go server --path "./local/path/to/folder/of/videos"

On Linux (I've tested on Ubuntu Raspberry Pi OS) you may need to prepend DISPLAY=:0.0, e.g. go run cmds/cli/main.go server --path "./local/path/to/folder/of/videos"

Interact with the Server via the Client

View what's currently playing

go run cmds/cli/main.go client live

Play the next piece of media

go run cmds/cli/main.go client play_next

The CLI client assumes the server is running at localhost:3004. See go run cmds/cli/main.go help for more options.

Interact with the Server via the web UI

Navigate to http://localhost:3004/ in your browser.

Advanced

There is a partially implemented notion of networks and multiple channels. These are exposed over a REST API, see server.go and api.go for more details.

Interact with the Server via the HTTP API

Request

curl http://localhost:3004/api/networks

Response

[
    {
        "name": "Homelab Cable",
        "call_sign": "KHLC"
    }
]

Request

curl http://localhost:3004/api/:call_sign/channels

Response

[
    {
        "id": "bd63bc6a-27cd-47fb-81d5-642a216f335e",
        "playing": "title of currently playing media.mp4",
        "up_next": "title of the next show which will play.mp4",
        "live": true // whether or not this channel is outputing via VLC on the device
    },
    {
        "id": "0cd43939-082b-4c15-b642-0682a035cfb0",
        "playing": "some other currently playing media.mp4",
        "up_next": "some other show which will play next.mp4",
        "live": false // if false, the channel is a 'virtual' channel. it is cycling through its media list in memory every 30 minutes to mimic a channel that isn't being watched.
    }
]

go-homelab-cable's People

Contributors

clabland 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.