Giter Site home page Giter Site logo

bcmmbaga / gohls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shimberger/gohls

0.0 0.0 0.0 2.31 MB

A server that exposes a directory for video streaming via web interface

Home Page: https://shimberger.github.io/gohls/

License: Other

Go 57.38% Dockerfile 0.03% Shell 2.43% HTML 0.72% TypeScript 38.70% JavaScript 0.75%

gohls's Introduction

Golang HLS Streamer

CircleCI

Simple server that exposes a directory for video streaming via HTTP Live Streaming (HLS). Uses ffmpeg for transcoding.

This project is cobbled together from all kinds of code I had lying around so it's pretty crappy all around. It also has some serious shortcomings.

Running it

Important: You need the ffmpeg and ffprobe binaries in your PATH. The server will not start without them. You can find builds most operating systems at https://ffmpeg.org/download.html.

1. Download the binary for your operating system

You can find the latest release on the releases page https://github.com/shimberger/gohls/releases or just download a current snapshot:

2. Create a configuration file

The configuration is stored in JSON format. Just call the file gohls-config.json or whatever you like. The format is as follows:

{
	"folders": [
		{
			"path": "~/Videos",
			"title": "My Videos"
		},
		{
			"path": "~/Downloads",
			"title": "My Downloads"
		}
	]
}

This will configure which directories on your system will be made available for streaming. See the screenshot for details:

3. Run the server

Execute the command gohls serve -config <path-to-config> e.g. gohls serve -config gohls-config.json to serve the videos specified by the config file. To make the server listen on another port or address just use the serve command with --listen like so (the example uses port 7000 on all interfaces): gohls serve --listen :7000 -config <path-to-config>

4. Open a web browser

Visit the URL http://127.0.0.1:8080 to access the web interface.

Contributing

Just do a go get github.com/shimberger/gohls/... in your GOPATH. Then change into the project directory and run the development server by executing ./scripts/run_dev (sorry Windows users, maybe try Windows Subsystem for Linux). You need npm and node to build the frontend.

License

See LICENSE.txt

gohls's People

Contributors

alai04 avatar genofire avatar glaslos avatar p0rsche avatar shimberger avatar ysmood 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.