Appear to be broadcasting live, but use a pre-recorded video.
Option 1: Use a 3rd party service to send an RTMP stream
Option 2: Build your own server to send an RTMP stream
Option 3: Use on-demand and simulate live in the UI
Other terms for Simulated Live
You may have a pre-recorded video and want to use Mux to broadcast it as if it were live.
For now, Mux does not support Simulated Live streaming directly as a feature. As a work-around, this guide provides a few options to implement your own Simulated Live streaming solution.
Simulated Live streaming is a common strategy to ensure reliability. For example, if your platform has groups of users watching content simultaneously, you will want to employ one of the following strategies.
Before reading on...
You should be familiar with how live streaming works:
The most straightforward and reliable option we recommend is to use a third party service built for Simulated Live streaming. The service will allow you to upload videos and send out an RTMP stream at a scheduled time.
Upload your video to the service, enter in the Mux rtmp
ingest server details, and schedule the time you want it to "go live".
For example, restream.io offers this guide to get started with pre-recorded videos. Note that there is a cost associated with this option.
The second option we recommend is to build your own server that is capable of uploading video and sending an RTMP stream to Mux.
To do this, run encoder software that can ingest a video file and sends output to a Mux RTMP ingest URL. Software you might use to build a server include ffmpeg or GStreamer.
If you are going with this "home-rolling" route, your program should:
Handle network blips gracefully. Even if your server is running in a reliable cloud like AWS or Google, networking between commercial data centers may experience interruptions.
Handle disconnects. In particular, ffmpeg
does not have any built in disconnect handling so if you use that software you should make sure you have a solution to handle them.
Hold up to rigorous testing. Test the program with different types of content and long running streams. Make sure what you built is reliable before you use it in production.
The final option is to skip the backend live streaming setup, use an on-demand video, and make it "appear live" in your UI. This is a work-around we have seen success with.
To simulate a Live Stream in the UI you could:
We'd love to hear what is working and what isn't working, so if you are using one of these solutions (or some other solution), please send your ideas.
If you are interested in Simulated Live streaming as a Mux feature, let us know about your use case and specific needs!