How to Troubleshoot Your HLS Live Stream

Troubleshoot HLS Live Stream

As the popularity of live video streaming protocols has grown, so too has the ease and simplicity in setting them up. With technology constantly evolving and maturing, anyone can create live streams today. Streaming video has been made more universal and easier than ever with a professional streaming platform.

However, technical issues sometimes arise. With live streaming, this often occurs with HLS streaming. HLS streaming is a video media protocol. It’s the most popular streaming method as it’s one of the best – and it’s used here at Dacast. the HLS protocol is reliable and widely compatible with the best modern technologies such as adaptive bitrate streaming protocols like H.265. This way, live streams and media files can be viewed on modern web browsers and mobile devices.

In this article, we’re going to outline and detail how to identify and fix problems that may arise with your HLS video streaming. We’re experts in video streaming and providing a professional-grade video streaming solution and platform to organisations, businesses and individuals alike. Our goal here is to give you the tools so that the next time a problem arises you’ll know exactly what to do.

Using our 7-step process, we can diagnose and troubleshoot issues with live streaming and HLS streaming protocol. Read on, read through the steps and you’ll be armed with our top tips to keep your live media streams back up and running like clockwork.

  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

1. Encoder Troubleshooting

The first step in troubleshooting an HLS live stream error 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.

Check and ensure that your Stream URL and Stream Name match with the values from your Online Video Platform. If they don’t, fix them, and see if your HLS stream error is fixed. 

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.

Working through the above stops should fix any error occurring with HLS due to your encoder or encoder settings. 

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 a lack of bandwidth.

Every 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.

If you don’t have enough bandwidth, reach out to support to purchase more bandwidth. 

3. Is Your Channel Turned On?

Another problem that can occur is streaming 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.This is an easy way to fix a stream that isn’t working. 

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 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. Use those directions to easily fix a firewall related HLS stream error. 

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.

The wrong embed code is an easy HLS stream error to fix 

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.

FAQ for Troubleshooting HLS Live Streams

Q1: Who is Max Wilbert, and why should I trust his advice on HLS live streaming troubleshooting? R1: Max Wilbert is a passionate writer and live streaming practitioner with strong expertise in the video streaming industry. He shares valuable insights and tips based on his experience, making him a trustworthy source for troubleshooting HLS live streams.

Q2: What is HLS streaming, and why is it popular? R2: HLS (HTTP Live Streaming) is a video media protocol widely used in the streaming industry due to its reliability and compatibility with modern technologies like adaptive bitrate streaming protocols. It ensures seamless viewing on various web browsers and mobile devices.

Q3: What are the 7 steps for troubleshooting an HLS live stream? R3: Here are the 7 steps:

  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

Q4: What should I check during encoder troubleshooting? R4: When troubleshooting your encoder, you should verify: a) Stream URL and Stream Name b) Login and Password (if required) c) Multi-bitrate streams naming d) Other encoder settings

Q5: How can I check my available bandwidth? A5: You can check your available bandwidth in your Dacast account under the “Upgrade my plan” section. It displays the remaining bandwidth for your plan.

Q6: What should I do if my live channel is not working? A6: Ensure that your live channel is turned on in your Dacast account. Navigate to your live channels, select the channel in question, and make sure it is toggled to “on.”

Q7: How can bitrates affect my stream quality and reliability? A7: If your bitrates are too high for your internet upload speed, your stream may lag or fail. It’s recommended to cap your total stream bitrate at about half your total upload speed.

Q8: How can I fix issues related to firewalls and ports? A8: Firewalls can cause streaming problems. Ensure that ports 80, 443, or 1935 are open for Dacast streaming. Follow the directions for your operating system or router to make necessary adjustments.

Q9: What should I do if my embedded video player is causing problems? A9: Check the embed code on your website by right-clicking on the page, selecting “view page source,” and searching for “dacast.” Compare this code to the one in your Dacast back office. If they don’t match, replace the old code with the correct one.

Q10: What can I do if none of the troubleshooting steps work? A10: You have three options: a) Try using the backup stream URL as your primary URL. b) Create a new live channel from scratch. c) Contact Dacast support for assistance, providing encoder settings and error messages for a quicker resolution.

Q11: Why should I consider using Dacast for my streaming needs? A11: Dacast offers a professional-grade video streaming solution with secure video delivery, upload capabilities, customization options, monetization features, and 24/7 expert technical support. It utilizes the best HLS streaming protocols, ensuring a consistently smooth streaming experience.

Q12: How can I get in touch with Dacast support? A12: Technical support is available 24/7 to Dacast users. Starter Plan users can use chat support, while Pro and Premium plan users can access phone support. Provide encoder settings and error messages for faster assistance.

Final Thoughts

As we’ve shown, identifying issues and troubleshooting a HLS live stream is easy if you know what to do. We recommend saving this article for future reference.

Better still, if you’re not already using a professional-grade, complete video streaming server solution, you should consider Dacast.

With Dacast, you’ll have a streaming platform you can rely on. Our feature-rich video streaming solution that allows for a multitude of media streaming. You can video stream live as well as premade video files. You’ll get secure video delivery, upload capabilities, truly customizable features, monetization options and much more. And since Dacast uses the best HLS streaming protocols, you’ll get a consistently smooth streaming experience. What’s more, our expert technical support is available 24/7 to Dacast users.

Start now

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.

Max Wilbert

Max Wilbert is a passionate writer, live streaming practitioner, and has strong expertise in the video streaming industry.