How to Set Up an RTMP Server on Windows, Linux, and Mac
What Is an RTMP Server?
RTMP server software allows you to take an incoming Real-Time Messaging Protocol (RTMP) live video stream from an encoder, and transmux it into a playback protocol like HTTP Live Streaming (HLS) for viewing. While there are media server services out there which can do this for you, using your own RTMP server software gives you the freedom and control to modify and configure your setup as needed.
Why Do You Need an RTMP Server for Live Streaming?
A different protocol is often used for ingest and delivery to speed up the journey from the camera screen to the end-user device — while also optimizing the viewing experience. That’s why content distributors use a media server software or service to convert the live feed from one protocol to another.
RTMP is great for efficient video contribution, but it no longer makes sense on the publishing end of a workflow. Rather, most content distributors use a media server to repackage their stream into an HTTP-based protocol like HLS for delivery to end users. Whether the RTMP stream is coming from an IP camera, mobile app, or broadcast-grade encoder, Wowza’s live streaming platform makes the conversion and delivery process seamless.
Robert Gibb at StackPath writes:
“A media server is an absolute necessity if you want to leverage RTMP for live streaming. Wowza Streaming Engine, for example, is a widely used streaming software for live and on-demand video that can be installed on any server.”
Tutorial: How to Set Up Wowza Streaming Engine as an RTMP Server
Wowza Streaming Engine is the RTMP server of choice. Easily customizable and number one in reliability. Wowza Streaming Engine runs on Windows, Linux, and Mac — although the latter does have reduced functionality.
All the installers can be found on the Downloads page of wowza.com and you’ll need to purchase a license for use. The install process is identical on all operating systems: execute the installer, accept the license agreement, enter the license key, create a username and password for Wowza Streaming Engine, choose to have it start up manually vs. automatically, select where it should be installed, and then let the install run.
Differences may include the need to run as an administrator, or, if you have an old installation of Wowza Streaming Engine still on the system, choosing which version you want to activate. Also, as I mentioned, the Mac version has several limitations, such as with transcoder capabilities. For this reason, I strongly recommend running on Windows or Linux with a static IP address. Without a static IP address, your server cannot be found for playback outside of your local network.
For easy installations, you can find Wowza Streaming Engine on the AWS marketplace for EC2, Microsoft Azure, Alibaba Cloud, Google Cloud Platform, and Rackspace.
Once installed, use the IP address of the computer or your static IP address with port 8088. This will take you to the Wowza Streaming Engine Manager. You can Skip the intro and just use the username and password you created during the install to sign in.
One of the first things you may want to do under Server is set up Source Authentication for security. By adding a source, you can ensure only streams you trust can connect. However, if you’re not concerned, or just streaming on a local network, you can always turn it off. That’s done directly from the application.
When creating your first application for your first live stream, you do have the option to set up edge servers as well as load balancing for better scaling. After all, many companies use Wowza Streaming Engine to create their own content delivery networks (CDN). But Single Server is probably where you’ll want to get started, naming it appropriately without confusing spaces.
With the application created, you’ll want to make a few immediate changes. For example, if you know you’ll only be using HLS playback, you can uncheck all the other playback types so processing power won’t be wasted transmuxing. Also, if you want to bring down the latency from the normal 30-45 down to 9-12 seconds, check Low-Latency Stream. You can also auto record the streams, cross-origin resource share, change the directory they’ll be stored, set up Closed Captions, and limit the number of viewers. When you’re done making your changes, be sure to Save.
As I mentioned, you can also go to Source Security and then Edit your settings for RTMP Sources so it’s Open and no authentication is required. Again, that’s up to you. Don’t forget, once again, that any changes will require you to restart.
For those looking to scale with a CDN, this is done under Stream Targets. While there are several solutions available, Wowza does offer the Wowza CDN for you to use. If you have only a few viewers and aren’t ready to scale up, that’s okay.
To start streaming, your encoder will ask for a server, steam key, and authentication. From Sources Live, you can get this and some quick options for specific hardware. We’re going to skip the authentication since we’ve turned it off. While you can choose the stream key name that you want, the server will be rtmp:// your IP ADDRESS (being that static or local) :1935/application name. That’s it.
If it’s properly connected you’ll see it under Incoming Streams. You can select it, and then Test Playback to view the stream. If HLS is the only playback option you have for the application, copy the URL and try playing it back on options that support HLS. If this is just on the local network, you’ll need to use something like VLC Player to verify the stream is working. If you do have a static IP address, you can use commercial players like THEOPlayer to verify playback, although I’d advise you to set up a full account for both testing and implementation.
Alright, that’s it for setting up an RTMP streaming server like Wowza Streaming Engine and running a live stream. For more assistance with live video streaming, you can always contact us at Wowza.