Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Streaming to Livepeer From Broadcasting Apps
- Install and run a local Livepeer node. The instructions to do so are here
- You can begin broadcasting by setting your RTMP output in your broadcasting app to
rtmp://localhost:1935/stream. (Feel free to replace localhost with your ip or hostname if broadcasting from phone to a remote node). You will see the newly generated stream IDs in the console output. At that point any other Livepeer node can watch the stream by using the Desktop App or running
livepeer stream <streamid> for RTMP stream ID
livepeer --hls stream <streamid> for HLS stream ID
However, sometimes it is much easier to determine your stream ID in advance so that you can actually share a link to it. To get a stream ID after you have started your node, run...
This will output a new RTMP stream id. Copy it. You can also generate an HLS id by simply changing one of the last characters in the RTMP stream ID so that the HLS ID is unique. At this point you can use your broadcasting tool and set your RTMP output URL to:
rtmp://localhost:1935/stream/<RTMP stream ID>?hlsStrmID=<HLS Stream ID>
Now you know both the HLS and RTMP IDs in advance so that you can reuse the same stream and actually program a DApp to read those values specifically to embed YOUR stream (or better yet, store them in ENS or Swarm).