What is an M3U file

An M3U holds no video. It is a text file listing addresses, like a phone book: it does not store the conversations, only who to call.

An index, not a container

That distinction explains almost every question the format raises. A 2 KB M3U file can give access to thousands of channels because it carries not a single frame inside: it carries the addresses where each broadcast lives. If the server at the other end stops responding tomorrow, the file is byte for byte the same and nothing works. And the reverse: the file does not grow because the channels are higher quality.

The format was born in the late nineties for Winamp playlists, and was called M3U for "MP3 URL". There never was an official specification: it standardised in practice, by use. Which is why every provider writes its playlists with small variations.

What it looks like inside

Open it in any text editor and you will see something like this:

  • The first line is always #EXTM3U. Without it, it is not a valid extended M3U playlist.
  • Then come pairs of lines: one starting with #EXTINF carrying the channel information, and below it the stream address.
  • The #EXTINF line carries attributes in quotes and then, after a comma, the name that gets displayed.

Three attributes genuinely matter, and they are worth knowing because they decide whether the playlist looks tidy or a mess:

AttributeWhat it does
tvg-idThe identifier linking the channel to its schedule in the EPG. Missing or wrong, and the channel shows with no programmes
tvg-logoThe address of the channel logo
group-titleThe category it is grouped under. This is what produces the Sports, Movies, Kids blocks and so on

When someone says their playlist "looks disorganised" or "has no logos", it is almost always that the provider did not fill these attributes in. It is not the player: the information simply is not in the file.

M3U and M3U8: the difference

The confusion is common because the .m3u8 extension is used for two different things.

  1. As an encodingAn .m3u8 is an M3U saved in UTF-8. That is what lets channel names carry accents, Cyrillic or Chinese characters without turning into odd symbols. In practice almost everything is UTF-8 today, so this difference matters less than it used to.
  2. As an HLS manifestThis is the real difference. In HLS streaming, an .m3u8 is not a channel list: it is the index of the video segments of ONE broadcast, regenerated every few seconds while it is live. It is a living file, not a list you keep.

Put another way: the M3U you add to your player lists channels; the M3U8 that appears inside playing each channel lists chunks of video. They look alike and have nothing to do with each other in purpose.

M3U versus Xtream Codes

Many providers hand out both for the same access, and it is worth knowing which to pick.

M3UXtream Codes
What it isA text file with the listAn API the player queries
What you getA URLServer, username and password
CategoriesWhatever group-title carriesWhatever the server returns, already structured
When the provider changes somethingThe whole playlist has to be downloaded againIt shows up on the next query

If you are given both, Xtream usually works better: it carries more structured information and copes better when the provider changes things. A curiosity: many M3U URLs are really Xtream portals in disguise. If yours contains get.php with username and password, it is one of those.

Where an M3U file comes from

From three places, and they are worth telling apart:

  • Your television provider gives it to you when you take out a service.
  • You generate it yourself, for instance to organise your own videos or network cameras.
  • A device or software of yours exports it: some networked DVB tuners publish their own M3U playlist.

Already have your playlist and want to organise it with an EPG guide and favourites?

See Chlyra TV