M3U vs Xtream: what’s the difference?

M3U and Xtream Codes are two hand-over formats for the same subscription. An M3U is one URL that carries everything — the channel list and, usually, your credentials. Xtream is three fields — server, username, password — that a player uses to query a JSON API. Most providers offer both.

M3U: one link that carries everything

An M3U playlist is a flat text file: one #EXTINF line per channel with its name and tags, then the stream URL. Your provider serves it from a URL, and that URL is the whole hand-over — typically shaped like https://host/get.php?username=…&password=…&type=m3u_plus. Read it again: your username and password ride inside the link. Anything that sees the URL holds your login, which is why an M3U link should be treated like a password.

The playlist arrives whole — one fetch, every channel. Simple, portable, and a little blunt: a big line-up means a big file, and picking up changes means downloading all of it again.

Xtream: a login that answers questions

Xtream Codes hands over three fields instead — server address, username, password — and the player uses them to query a JSON API (player_api.php). Channels come by category as the player asks; the guide comes through the same login; and the account status reports when the plan expires and how many simultaneous connections it allows. Same subscription, served in pieces.

Stream URLs are then assembled from the same three fields — the server, then the username and password as path segments, then a channel id. So the “login” and the “link” are really two arrangements of the same facts, and neither is more secret than the other: the Xtream API sends your credentials with each request too, so the connection they ride matters as much as the format.

The pieces matter at scale, though: a line-up of tens of thousands of channels loads without shipping one giant file, and picking up a line-up change doesn’t mean downloading the lot again.

The guide

The EPG is where the two differ most in practice. With an M3U you usually get a separate XMLTV URL to pair with the playlist — two links to keep in sync. With Xtream, guide data comes through the same login, matched to the same channel ids. Same schedule either way; one route has fewer moving parts.

Which players take which

Nearly every IPTV player accepts an M3U — it’s the lowest common denominator, decades old. Xtream support is standard in dedicated IPTV apps and thinner in general-purpose media players. If your provider hands you both, the choice is about your player, not your channels: the line-up is the same underneath.

Naming is loose in the wild, too. Add-source screens say “M3U”, “M3U8”, “playlist URL”, “Xtream”, “Xtream API”, or just “login” — the giveaway is the shape of what you were given. A bare URL is an M3U; three fields are Xtream.

How twiga takes each

twiga takes both, and both take the same path. Creating either source pins only the non-secret host. To build your channel list, your login passes through twiga’s server in memory, whether it is three Xtream fields or one M3U link: the catalogue or playlist is fetched from twiga’s exits, so your provider sees our IP, not your home one, and your browser builds the list and seals your login and each stream URL. Neither format is stored readable, and both are sealed the same way. Your provider login is sealed in your browser with your key. The server stores ciphertext and opens it in memory while you’re signed in, then wipes it 30 minutes after your session goes quiet. The channel names stay in the clear so search and the guide load fast.

Either way the stream path is identical — streams route via twiga’s exits, the guide goes over Tor, and the blind relay in the middle can’t read what passes through it.

Got your three fields — or your link? add your source