Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Add Dockerfile for containeraization
Gabe Kangasbd145fddf0f1
diff --git a/Dockerfile b/Dockerfilenew file mode 100644index 0000000000..387bd2c1c0--- /dev/null+++ b/Dockerfile@@ -0,0 +1,10 @@+FROM golang:alpine+EXPOSE 8080 1935+RUN mkdir /app+ADD . /app+WORKDIR /app+RUN apk add --no-cache ffmpeg ffmpeg-libs+RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o owncast .+RUN ls -al owncast+WORKDIR /app+CMD ["/app/owncast"]\ No newline at end of filediff --git a/README.md b/README.mdindex e30f5be33d..40be713ebd 100644--- a/README.md+++ b/README.md@@ -27,6 +27,7 @@* [Prerequisites](#prerequisites)* [Installation](#installation)* [Usage](#usage)+ * [Docker](#docker)* [Usage with OBS](#usage-with-obs)* [Video storage and distribution options](#video-storage-options)* [Advanced usage](#advanced-usage)@@ -84,6 +85,13 @@ The goal is to have a single service that you can run and it works out of the bo1. Open your web browser and visit http://yourserver:8080/. If you changed the port in the config file, then change the URL accordingly. If you are testing this on your own personal computer then you can visit http://localhost:8080.+### Docker++If you want a simpler way to run an instance of owncast you can run it in a container with the supplied Dockerfile.++1. Run `docker build -t owncast .`+1. Run `docker run -p 8080:8080 -p 1935:1935 -it owncast`+## Usage with OBS1. Install [OBS](https://obsproject.com/) and get it working with your local setup.diff --git a/ffmpeg.go b/ffmpeg.goindex 1ea39064f0..ed0c666c49 100644--- a/ffmpeg.go+++ b/ffmpeg.go@@ -73,7 +73,7 @@ func startFfmpeg(configuration Config) {// fmt.Println(ffmpegCmd)- _, err := exec.Command("bash", "-c", ffmpegCmd).Output()+ _, err := exec.Command("sh", "-c", ffmpegCmd).Output()fmt.Println(err)verifyError(err)}