goTube is a simple, self-contained live video streaming server written in Go. It allows you to broadcast from OBS Studio (or any RTMP-capable encoder) and play the livestream directly in your browser via HLS. No external RTMP or HLS server setup required — everything is handled by goTube!
- Accepts RTMP streams (e.g. from OBS)
- Converts RTMP to HLS using ffmpeg (automatically run by goTube)
- Serves a modern web player (Video.js) at http://localhost:8585/
- Completely self-hosted and easy to use
- Go 1.18 or higher
- ffmpeg installed and available in your PATH
- OBS Studio or another RTMP source
-
Clone the repo:
git clone https://github.com/SarahRoseLives/goTube.git cd goTube
-
Build the server:
go build -o goTube main.go
-
Make sure the directories exist:
mkdir -p hls static
(If you use the provided
main.go
andstatic/index.html
, these directories should be present.)
-
Start the goTube server:
./goTube
You should see output like:
Serving web player on http://localhost:8585/ Waiting for RTMP stream at rtmp://localhost:1935/live/stream...
-
Configure OBS Studio:
-
Start streaming from OBS.
-
Open your browser and go to:
http://localhost:8585/
You should see the player. After a few seconds (once segments are generated), your live video will appear.
- goTube starts a web server on port 8585 and runs ffmpeg in the background.
- ffmpeg listens for RTMP on port 1935, and when OBS connects, it converts the RTMP stream to HLS segments in the
hls/
directory. - The web server serves the web player and the HLS segments, allowing you to watch your stream in real time.
- 404 or player not loading:
Ensurestatic/index.html
exists and you are running goTube from the correct directory. - No video appears:
Make sure OBS is streaming, and wait a few seconds for the first HLS segments to be generated. - ffmpeg: command not found:
Install ffmpeg and ensure it is available on your system's PATH.
- You can modify
static/index.html
to change the player UI or add features. - If you want to stream from another computer, change
localhost
in the OBS server URL to your server’s IP address, and make sure ports 8585 and 1935 are open.