Quick Start Guide

This guide will walk you through the essential steps to get your first live stream up and running with LiveGo.

Prerequisites

  • LiveGo installed and running. See the Installation Guide.
  • FFmpeg installed for pushing a video stream.
  • A media player like VLC or ffplay for playback.

Step 1: Start the LiveGo Server

Navigate to your LiveGo directory and run the binary:

./livego

If you are using Docker, make sure your container is running. By default, the server will start with the configuration from livego.yaml and listen on the following ports:

  • RTMP: 1935
  • HTTP-FLV: 7001
  • HLS: 7002
  • HTTP API: 8090

Step 2: Get a Stream Key

For security, streams are published using a unique channelkey. You can obtain one from the HTTP API. In this example, we'll create a stream named movie.

Open your browser or use curl to access the /control/get endpoint:

curl "http://localhost:8090/control/get?room=movie"

The server will respond with a unique key. It will look something like this (your key will be different):

ZJjA5SgNa4a5a5Ft2k3mI3Yt3o4r7X6y1w7z9q0E2u1B4v6C8D

Copy this key. This is your channelkey.

Step 3: Push a Video Stream

Now, use FFmpeg to push a video file to the LiveGo server. You will need a sample video file (e.g., demo.flv).

Replace {appname} with live (the default application name) and {channelkey} with the key you received in the previous step.

ffmpeg -re -i demo.flv -c copy -f flv rtmp://localhost:1935/live/{channelkey}

Example command with the key from above:

ffmpeg -re -i demo.flv -c copy -f flv rtmp://localhost:1935/live/ZJjA5SgNa4a5a5Ft2k3mI3Yt3o4r7X6y1w7z9q0E2u1B4v6C8D

Your stream is now live!

Step 4: Play the Stream

You can now play the live stream using various protocols. The stream is identified by the name you chose in Step 2 (movie).

  • Using RTMP Open this URL in a media player like VLC: rtmp://localhost:1935/live/movie

  • Using HTTP-FLV This is ideal for low-latency web playback. Use a player like ffplay or a web player like flv.js: http://localhost:7001/live/movie.flv

  • Using HLS This is best for broad compatibility, especially on mobile devices. Note that HLS has higher latency. http://localhost:7002/live/movie.m3u8

Congratulations! You have successfully set up and used LiveGo to broadcast a live stream.