Take control over your live stream video by running it yourself. Streaming + chat out of the box.
Find a file
Ruffy 9c484efd36
Feature/oc 1316 add support for system message to single user (#1351)
* add public func to lookup a ChatClient by its clientId

* add facility to send a system message directly to a user

* add clientId field to UserEvent

* implement simple http endpoint to send a message to a user

* let mux handle new directSystemMessageToUser endpoint

* add ClientId to UserEvents across the codebase

* render body of system-message to client

* add clientId to Chat-Message

* add tests showing how url-parsing should work

* add simple rest endpoint helpers for parameter-parsing and easy routing

* use newly added rest-endpoint helper to rout to Client-Messaging controller

* use safe "ReadRestUrlParameter" to parse ClientId

* remove empty HandleFunc in router

* set Header directly to prevent built-in (platform-dependent) canonicalization to kick in

* fix typo in "Parameter" message

* remove debug-logging of HTTP headers in REST-helpers

* convert to uint32 to prevent overruns when converting to wraptype uint later on

* resolve linter-ouchies

* resolve linter potential nil-deref warning

* document the SendSystemMessageToClient endpoint in swaggerdoc

* remove clientId assignment causing potential nil dereference in userDisabledEvent-case

as the clientId isn't relevant here anyway

* make findClientById private, so its not accessible outside of core/chat

* remove redundant string type hint

* Update PR based on linter requirements

Co-authored-by: Raffael Rehberger <raffael@rtrace.io>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2021-09-13 01:26:28 -07:00
.github Have nightly build create a production build of tailwind 2021-09-13 00:06:10 -07:00
.vscode 0.0.6 -> Master (#731) 2021-02-18 23:05:52 -08:00
build Have nightly build create a production build of tailwind 2021-09-13 00:06:10 -07:00
config Simplify HLS storage paths (#1393) 2021-09-12 11:32:42 -07:00
controllers Feature/oc 1316 add support for system message to single user (#1351) 2021-09-13 01:26:28 -07:00
core Feature/oc 1316 add support for system message to single user (#1351) 2021-09-13 01:26:28 -07:00
doc Commit updated API documentation 2021-07-22 00:20:22 +00:00
examples Banjo/owncast systemd service (#749) 2021-02-21 11:04:20 -08:00
geoip Restore GeoIP support to now support chat users. Closes #1304 2021-08-13 08:52:36 +02:00
logging Expanded linting + fix warnings (#1396) 2021-09-12 00:18:15 -07:00
metrics Expanded linting + fix warnings (#1396) 2021-09-12 00:18:15 -07:00
models Expanded linting + fix warnings (#1396) 2021-09-12 00:18:15 -07:00
router Feature/oc 1316 add support for system message to single user (#1351) 2021-09-13 01:26:28 -07:00
static Fix metadata.html crash. Closes #746. Re: #685 2021-02-20 16:47:47 -08:00
test Add automated integration test for client list API. 2021-08-13 08:52:36 +02:00
utils Feature/oc 1316 add support for system message to single user (#1351) 2021-09-13 01:26:28 -07:00
webroot Commit updated Javascript packages 2021-09-06 19:36:35 +00:00
yp Expanded linting + fix warnings (#1396) 2021-09-12 00:18:15 -07:00
.editorconfig add starter editorconfig file 2020-08-09 23:44:04 -07:00
.gitattributes Mark micromodal as vendored 2021-09-07 11:04:09 -07:00
.gitignore Save owncast logs to log file. Closes #908 2021-05-22 19:25:54 -07:00
.golangci.yml Expanded linting + fix warnings (#1396) 2021-09-12 00:18:15 -07:00
.prettierignore Format javascript on push 2021-02-05 13:10:52 -08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2020-07-08 17:08:28 -07:00
CONTRIBUTING.md Create CONTRIBUTING.md (#1394) 2021-09-10 12:36:42 -07:00
Dockerfile Fix the passed in version number not being used due to an incorrect var 2021-06-28 16:01:01 -07:00
go.mod Bump github.com/shirou/gopsutil (#1369) 2021-09-01 11:50:16 -07:00
go.sum Bump github.com/shirou/gopsutil (#1369) 2021-09-01 11:50:16 -07:00
LICENSE Create LICENSE 2020-07-08 17:07:09 -07:00
main.go do not exit after successful stream key change (#1355) 2021-08-28 10:39:42 -07:00
openapi.yaml Feature/oc 1316 add support for system message to single user (#1351) 2021-09-13 01:26:28 -07:00
pkged.go Update admin bundle 2021-08-30 18:24:28 -07:00
README.md Simplify repo Readme and focus on building/running/contributing and less about features 2021-09-10 16:21:38 -07:00


Logo


Take control over your content and stream it yourself.
Explore the docs »
View Demo · Use Our Server for Testing · FAQ · Report Bug

Table of Contents

About The Project

Owncast is an open source, self-hosted, decentralized, single user live video streaming and chat server for running your own live streams similar in style to the large mainstream options. It offers complete ownership over your content, interface, moderation and audience. Visit the demo for an example.


Getting Started

The goal is to have a single service that you can run and it works out of the box. Visit the Quickstart to get up and running.

Use with your existing broadcasting software

In general Owncast is compatible with any software that uses RTMP to broadcast to a remote server. RTMP is what all the major live streaming services use, so if youre currently using one of those its likely that you can point your existing software at your Owncast instance instead.

OBS, Streamlabs, Restream and many others have been used with Owncast. Read more about compatibility with existing software.

Building from Source

  1. Ensure you have the gcc compiler configured.
  2. Install the Go toolchain.
  3. Clone the repo. git clone https://github.com/owncast/owncast
  4. go run main.go pkged.go will run from source.
  5. Point your broadcasting software at your new server and start streaming.

There is also a supplied Dockerfile so you can spin it up from source with little effort. Read more about running from source.

Bundling in latest admin from source

The admin ui is built at: https://github.com/owncast/owncast-admin it is bundled into the final binary using pkger.

To bundle in the latest admin UI:

  1. Install pkger. go install github.com/markbates/pkger/cmd/...
  2. From the owncast directory run the packager script: ./build/admin/bundleAdmin.sh
  3. Compile or run like above. go run main.go pkged.go

Contributing

Owncast is a growing open source project that is giving freedom, flexibility and fun to live streamers. And while we have a small team of kind, talented and thoughtful volunteers, we have gaps in our skillset that wed love to fill so we can get even better at building tools that make a difference for people.

We abide by our Code of Conduct and feel strongly about open, appreciative, and empathetic people joining us. Weve been very lucky to have this so far, so maybe you can help us with your skills and passion, too!

There is a larger, more detailed, and more up-to-date guide for helping contribute to Owncast on our website.

Architecture

Owncast consists of two repositories with two standalone projects. The repo you're looking at now is the core repository with the backend and frontend. owncast/owncast-admin is an additional web project that is built separately and used for configuration and management of an Owncast server.

Suggestions when working with the Owncast codebase

  1. Install golangci-lint for helpful warnings and suggestions directly in your editor when writing Go.
  2. If using VSCode install the lit-html extension to aid in syntax highlighting of our frontend HTML + Preact.
  3. Run the project with go run main.go pkged.go to make sure the Admin (at /admin) is available to you in your development environment.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project chat: Join us on Rocket.Chat if you want to contribute, follow along, or if you have questions.

Gabe Kangas - @gabek@mastodon.social - email gabek@real-ity.com

Project Link: https://github.com/owncast/owncast