How to use HLS (M3U8) extension to resolve IPTV buffering?

IPTV consumers widely use streaming lines, especially M3U format. However, there are 2 specific extensions that are available to a streaming line: MPEGTS (.ts) and M3U8 (HLS). In this article, we are going to understand the difference and explain HLS in detail.

 

What are MPEGTS and HLS (M3U8) file formats?

A streaming line has 2 popular extensions. These two are available on virtually all M3U or other streaming lines that IPTV providers provide. Hence changing between these two only requires a tweak of your line without the need of notifying your supplier. Let's explain each extension in detail:

 

What is MPEGTS and How does it work?

MPEGTS, also known as .ts is a streaming line extension most commonly used among IPTV users. It stands for Moving Picture Experts Group-Transport Stream. Almost all M3U lines that clients receive use this format.

http://myprovider.xyz:80/get.php?username=myusername&password=mypassword&type=m3u&output=ts

Above, is a M3U URL which is provided in MPEGTS format. We have determined that by verifying the value after "output=" that is "ts", and as explained before it is short for MPEGTS.

When an IPTV streaming line works based on MPEGTS extension, the server sends data to client's device consistently.

If there are any interruptions during the broadcast, between the source (Server) and destination (client), the buffering will happen.

 

What is HLS (M3U8) and how does it work?

Apple designed and developed HTTP Live Streaming (HLS) for media files.

How to verify: Let's use an example:

http://myprovider.xyz:80/get.php?username=myusername&password=mypassword&type=m3u&output=m3u8

If you look at the end of the URL above, M3U8 states that our streaming line is using HLS extension.

So, the idea of using this format is to send data in chunks instead of a consistent data transfer. HLS assembles chunks of data into one package, sends it to the client and the next package goes after that.

This is a good tool for clients who are on internet connections with high latencies with low packet losses. It helps them to deal with IPTV buffering.

 

How do you activate HLS (M3U8) on a streaming line?

There are two ways to benefit from HLS if you think, that's the solution to your problem streaming audio/video through IPTV.

Most IPTV applications these days give the option to choose between MPEGTS and HLS. You can simply open the settings on your application and then find "Stream Formats" or anything like that. Then you should be able to change the stream extension.

The examples below should clarify this better.

 

selecting hls on smarters pro

To enable this on IPTV Smarters Pro, from the dashboard click the gear icon at the top right to open Settings. Then choose Stream Format. When the above page appears, select HLS (.M3U8) and click Save Changes.

 

choosing HLS on xciptv

XCIPTV is yet another application which allows clients to enable HLS for streaming. All you need to do is to click the settings icon from the dashboard, choose Stream Type section and then you can choose HLS protocol

 

changing stream format on GSE

Another example is GSE Smart IPTV. Go to your playlist, choose Edit Server, and at the bottom of the page, you should find Stream Format. It allows you to choose between MPEGTS (.ts) and HLS (.M3U8).

 

Activation of HLS on streaming line address

 

There are cases where the IPTV streaming application does not have the option to change between stream formats. Therefore, you should do this manually directly on the streaming address. For instance, VLC player is one of these applications which is a slave to whichever streaming extension you provide it with.

 

Earlier in this article, we have shown the difference between .ts and .m3us and how to determine that in a streaming line URL. So the first thing to do is getting the URL ready in HLS format. Once done, you can either download the streaming file and load it into the application or paste the streaming URL inside.

 

Take a look at the example below:

http://provider.com:80/get.php?username=user1&password=pass1&type=m3u&output=m3u8

The streaming line we receive from our provider is the above. as you can see the m3u8 at the end confirms it is HLS capable. To stream this with VLC player, we must download the file and import.

 

editing m3u file with text editor

The playlist file is ready, let's have a look at what's inside first. To do that, you can edit the file with a Text Editor on your MAC system or Notepad on Windows.

 

m3u8 stream extension inside m3u file

This is how it looks inside a video streaming file (this is M3U8 without options like categories, epg tags ...). As you can see, all URLs are ending with .m3u8 in this plain text file.

Now, if we load this file into any application, it will play the streams in HLS mode.

 

Frequestion questions

 

Does HLS guarantee IPTV streaming without buffering?

No, HLS is useful when there are minor packet losses and even known IPTV throttling by ISPs. However, in some severe network conditions, it might not be helpful at all. The idea of using M3U8 is to benefit from adaptive bitrate streaming.

 

Does HLS work on all devices?

Yes it does. It works on all applications which have the possibility to change the streaming protocol. It can be mobile devices, personal computers, any ios devices or Android.

 

How do I enable it in my streaming application?

Most IPTV softwares have a section called Stream Format or Stream Extension, inside which you can change the MPEGTS to M3U8.