How to Troubleshoot Your HLS Live Stream

Live streaming has become simpler and easier than ever before. As the technology matures, anyone can begin streaming easily. That’s especially true if you use a powerful, easy-to-use streaming platform. However, as with any technical procedure, problems can arise. This blog is about troubleshooting an HLS live stream.

In brief, HLS is a streaming media protocol. It’s the most popular streaming method in use, and is the default here at DaCast. HLS is reliable and compatible with modern technology such as adaptive bitrate streaming and H.265. It also plays correctly on any modern web browser or device.

Here’s how to identify and fix problems that may arise with your HLS live stream.

7 Steps for troubleshooting an HLS Live Stream

Here at DaCast, we have experience with hundreds of thousands of live streams. Our tech support team has seen just about every problem there is. We generally follow a 7-step process for diagnosing issues with an HLS live stream. These steps are:

  1. Encoder troubleshooting
  2. Check your bandwidth
  3. Is your channel turned on?
  4. Check the bitrates
  5. Firewall and ports
  6. Embedded video players
  7. Backup streams or starting from scratch

Some of these are complex, while others are quick to check and correct. Let’s dive into the details of these steps so you can get started with troubleshooting your HLS live stream.

 

1. Encoder troubleshooting

The first step in troubleshooting an HLS live stream is to check your encoder. Encoder settings can cause a number of different problems. Therefore, this troubleshooting step can be divided into a number of sub-steps. If your encoder displays a message like “Streaming to primary,” your problem must be elsewhere. Move to step two if this is the case.

a) Verify “Stream URL” and “Stream Name”

How to Troubleshoot Your HLS Live Stream - streamAny encoder must be set to “point to” your streaming servers. That’s the location that the encoder delivers your live stream feed to; from there, it’s distributed to viewers. If this information is incorrect, the stream will fail—every time.

Most encoders have two relevant input fields in the settings. The first is “Stream URL,” and the second is “Stream Name.” Here’s an example of a Stream URL:

rtmp://p.ep123456.i.akamaientrypoint.net/EntryPoint

A “Stream Name” is usually formatted like this:

dclive_1_150@123456

These will have to match the values provided by your Online Video Platform in the “encoder setup” portion of creating a new live channel.

b) If your encoder has only a single “URL” field—no “Stream Name”

In this case, you’ll need to double-check a different value: the combined URL and stream name. To find this, navigate to “Encoder Setup” in your DaCast Account’s relevant live channel. Make sure that “Other RTMP encoders” is selected, then click the link below the “Backup URL.” This will link to the URL you need to input here. It should look something like this:

rtmp://p.ep123456.i.akamaientrypoint.net/EntryPoint/dclive_1_150@123456

c) Verify login and password

When DaCast is not officially integrated with your encoder, you’ll need to enter a login and password into your encoder settings as well. This information is also provided in the “Encoder Setup” portion of the DaCast backend.

Both the login and password are typically strings of 6 digits, and are different from your DaCast account login information.

d) Ensure multi-bitrate streams are named appropriately

If you’re streaming at multiple bit rates simultaneously, you’ll need to ensure that each stream is named appropriately. This involves replacing a portion of the stream name with a different text. In Wirecast, for example, the stream name “dclive_1_150@XXXXXX” would need to be changed to “dclive_1_1@XXXXXX”.

e) Verify other encoder settings

Other encoder settings should be as follows:

  • Keyframe interval: 2 seconds
  • Frame rate: 30 frames per second (fps)
  • H.264 video encoding (Baseline profile)
  • AAC or MP3 audio encoding (stereo)

If none of these methods work, you should test another encoder. We recommend testing with the free OBS Studio using a simple single-bitrate stream.

 

2. Check your bandwidth

That was a lot. This, however, is a quick one. One thing that can cause a live stream to fail is lack of bandwidth. Any DaCast plan comes with a limited amount of bandwidth. To check if you’ve hit your limit, visit your DaCast account. In the section “Upgrade my plan,” you will see the bandwidth you have remaining.

 

3. Is your channel turned on?

Another problem that can occur is stream failure due to your live channel not being turned on. This is another simple fix. In your DaCast account, navigate to your live channels. Select the channel in question, and make sure the channel is toggled to “on.”

 

4. Check the bitrates

How to Troubleshoot Your HLS Live Stream - internetIf your bitrates are too high for your internet upload speed, your stream will certainly fail. If you are streaming in high quality, or if your internet speeds are slower, this is more likely. In these circumstances, your stream may lag, buffer, or fail completely.

We recommend at capping your total stream bitrate—the cumulative total of all the different bitrates you’re streaming at—at about half your total upload speed.

You can test your upload speed at https://testmy.net/upload. If your upload isn’t double the total bitrate of your stream, we recommend decreasing the bitrates of your stream. Even if it appears you have plenty of bandwidth, it’s worth testing a lower bitrate to see if this fixes any stream problems.

 

5. Firewall and ports

Sometimes, a firewall can cause problems with streaming. This can occur both with the firewall on your own computer, or firewalls that are integrated into the network itself. To be able to stream, DaCast needs ports 80, 443, or 1935 to be open.

Any search engine should help you find directions for your own operating system or router.

 

6. Embedded video players

How to Troubleshoot Your HLS Live Stream - embed codeAnother problem that can arise comes with embedded video players. Embedding a video involves copying the code from the DaCast backend, then inserting that code into your website. This code can be copied inappropriately, or may have been wrong in the first place.

To determine if the code is correct, first visit the website on which your HLS live stream is embedded. Right click anywhere on the page, then click “view page source”. Search for the code in your browser using Ctrl+F on a PC or Cmd+F on a Mac. Search the text “dacast”. This will lead you to the embed code.

Compare this code to that found in the publish settings section of the video content you are using, in your DaCast back office. If they don’t match, delete the old code and try inserting the embed code once again. This may fix your problem.

 

7. Backup streams or starting from scratch

What if none of the above solutions solve your problem? In this case, we have three last tests to recommend.

a) Use backup stream

First, you can try using your backup stream URL as your primary URL. As noted in the first section, a stream URL will match this format:

rtmp://p.ep123456.i.akamaientrypoint.net/EntryPoint

A backup URL will look nearly the same, but will replace the “p” with a “b”:

rtmp://b.ep123456.i.akamaientrypoint.net/EntryPoint

If your stream fails despite the above troubleshooting, try replacing the stream URL with the backup URL in your embed codes. This may get your stream to function.

b) Create a new stream

If the backup stream doesn’t function, we recommend creating a new “live channel” and start from scratch. This can resolve many problems. If this works, please contact DaCast support so that we can investigate your original channel to try to determine the cause of the problem.

That leads you to your final option:

c) Contact DaCast support

Technical support is available 24/7 to DaCast users. The Starter Plan includes chat support. Pro and Premium plan users can access phone support. We recommend you provide us with a screenshot of your encoder settings and error messages. This will ensure we’re able to help you as rapidly as possible.

Conclusion

Troubleshooting an HLS live stream is easy, if you follow a certain set of steps. Otherwise, it’s easy to wander around until you find yourself confused. Did I already change this setting? Did I already test this? Follow our procedure, and this won’t happen.

If you are not already working with a video streaming solution, you can start today and take advantage of our free 30-day trial (no credit card required).

button

For exclusive offers and regular live streaming tips, you’re welcome to join our LinkedIn group. Have further questions, thoughts, or feedback about this article? We’d love to hear from you in the comments below. Thanks for reading, and good luck with your events.

Leave a Reply

Your email address will not be published. Required fields are marked *