M3U and Xtream Codes, explained
Updated
M3U and Xtream Codes are the two ways an IPTV provider hands over its channels. M3U is a text file or link listing streams. Xtream Codes is a login — server, username, password — that the player uses to ask the provider for channels, movies, series and guide data. If your provider offers both, Xtream usually gives the richer result.
What an M3U playlist is
An M3U file is plain text. It starts with #EXTM3U, and each channel takes two lines: an #EXTINF line describing the channel, then the stream address. M3U8 is the same format saved as UTF-8, which keeps non-Latin channel names intact.
Providers usually send an M3U link rather than a file, so the list stays current when they add or remove channels.
The M3U attributes that matter
- tvg-id — the channel’s ID in the program guide. If it does not match the guide, the channel shows no schedule.
- tvg-logo — a link to the channel logo.
- group-title — the category the channel is filed under, such as Sports or News.
- url-tvg (or x-tvg-url) on the #EXTM3U line — a link to the XMLTV guide that goes with the playlist.
4U reads all four, and a url-tvg link in the playlist header fills in the guide link for you.
What Xtream Codes is
Xtream Codes is an API many IPTV panels expose. Instead of a list, you give the player a server address, a username and a password, and it asks the server for live channels, movies, series, short guide data and, where the provider offers it, catch-up of past programmes.
Because the server returns structure, not just a list, an Xtream login gives you proper movie and series pages with posters, seasons and episodes.
M3U or Xtream: which to use
- Use Xtream if your provider offers it. You get categories, artwork, series structure and catch-up.
- Use M3U if it is all you have, or if you want to edit the channel list yourself.
- An Xtream login can usually be written as an M3U link too: server/get.php?username=…&password=…&type=m3u_plus. Many players accept either.
In 4U, catch-up works with Xtream logins only. M3U playlists play live channels, movies and series.
How to enter them in a player
- Look in the provider’s welcome email or dashboard for an M3U link or an Xtream login.
- In the player, add a playlist. Some players ask you to pick M3U or Xtream; 4U has one field that detects the format.
- Paste the M3U link, or enter the server address (including the port, for example :8080), username and password.
- If the channels have no schedule, add the provider’s XMLTV link in the player’s guide settings.
Where the program guide comes from
Guide data arrives as XMLTV, an XML format listing each channel’s programmes with start and end times. It reaches the player from an XMLTV link, from the Xtream server, or from guide data the player ships itself.
4U checks your own XMLTV link first, then its built-in guide for more than 50 countries, then the provider’s Xtream guide, so most channels show a schedule even when the provider sends none.
Related
4U is a player only. You must supply your own IPTV subscription.