HLS IPTV Encoder

M3U8 Encoder: HLS Playlists, Segments & Smart TV Playback

An M3U8 encoder turns a live video source into an HLS stream: a playlist file ending in .m3u8 plus short video segments that Smart TVs, apps and browsers can play over a normal web connection. This guide explains how HLS and M3U8 fit together, what the encoder does compared with the server, and how to test a stream on a real TV.

What the M3U8 file actually does

HLS (HTTP Live Streaming) is defined in RFC 8216. An M3U8 file is a UTF-8 text playlist that starts with #EXTM3U and lists the media a player should fetch. The path normally ends in .m3u8, or the server sends the content type application/vnd.apple.mpegurl.

There are two kinds of playlist:

  • Media playlist: lists the video segments in play order, each with its duration (EXTINF), and a required EXT-X-TARGETDURATION that no segment may exceed.
  • Master playlist: lists variant streams, each pointing to a media playlist at its own bitrate and resolution, so a player can switch to match network conditions.

A minimal live media playlist looks like this:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:120
#EXTINF:6.000,
segment120.ts
#EXTINF:6.000,
segment121.ts

A live playlist keeps adding new segments and drops old ones from the front. A recorded (VOD) playlist ends with EXT-X-ENDLIST. The player reloads a live playlist to find new segments.

Encoder versus packager

  • The encoder compresses the source, for example into H.264 video and AAC audio.
  • The packager or server cuts the stream into segments, writes the playlist and serves both over HTTP.

Some hardware encoders include the server. For example, PVI lists M3U8/HLS output on its VeCASTER and VeCODER encoders, with a built-in server. Others need a separate packager. Check which you are buying.

HLS segments and delay

Segments use formats such as MPEG-2 transport stream (.ts) or fragmented MP4. The player downloads a few segments before it starts, so HLS has a delay of several seconds compared with a direct network feed. RFC 8216 notes that segments longer than the target duration can cause playback stalls. Shorter segments can reduce delay but make the player reload more often. Test the setting on your actual devices.

Set up HLS on a PVI encoder

PVI describes these steps for Smart TVs and IP set-top boxes:

  1. Enable the HLS (/0.M3U8) format on the Main Stream encoder settings page.
  2. Copy the M3U8 URL from the encoder status page.
  3. If the app needs a channel list, create an M3U8 channel list file using the example format on the PVI support page, with the real IP address of your device.

PVI notes that its support does not cover third-party apps or devices. See PVI IPTV encoder setup for the full process.

Test the actual television app

  1. Open the M3U8 URL on a computer player first, to confirm the stream works.
  2. Open it on the target TV or set-top box app.
  3. Watch for startup time, buffering, audio sync and channel changes over several minutes.
  4. If the app fails, check the stream format it expects before changing the encoder.

Questions to ask before ordering

  • Does the encoder include an HLS server, or do you need a separate packager?
  • Which codecs does the HLS output use? See the HEVC IPTV encoder guide.
  • Can it publish several bitrates (variant streams) for different players?
  • Does your network need multicast instead? See the multicast encoder guide.

Frequently asked questions

Is M3U8 the same as HLS?

No. HLS is the streaming protocol. M3U8 is the playlist file format that an HLS player reads to find the video segments.

Does every IPTV encoder output HLS?

No. Many do, but you should confirm HLS output on the exact model. PVI lists M3U8/HLS for its VeCASTER HD H.264 and for the VeCODER ULTRA-8-HD.

What is an M3U8 channel list?

A playlist file that lists several streams, so an IP set-top box can show a channel menu. PVI gives an example format and says to use the real IP address of your device.

Why does HLS have a delay?

Players buffer several segments before and during playback, so HLS is normally several seconds behind a direct feed. Segment length and player buffering both matter.

Will every Smart TV play my M3U8 stream?

Not necessarily. Check which stream formats the TV app supports, and test on the real device.

Sources

Related encoder guides

Similar Posts