Guides

What is IPTV? How it works, IPTV vs OTT, and what an IPTV server needs

What is IPTV? TV delivered over IP: multicast in operator networks, HLS or DASH over the internet. How it works, IPTV vs OTT, and IPTV server bandwidth.

Published ~9 min read
On this page

Short answer: IPTV (Internet Protocol television) is television delivered as IP packets over a data network instead of through an antenna, a satellite dish or a cable TV signal. Telecom operators run it on their own network to a set-top box, usually as multicast; the word is also used for TV streamed over the open internet to apps, which is technically OTT and uses HLS or DASH over HTTPS. Behind both sit the same parts: encoders, a packager, an origin server, a delivery network, middleware and a programme guide.

IPTV is a technology, and a legal one: phone and broadband companies sell it, broadcasters and sports leagues stream their own channels with it, and hotels use it for in-room TV. What is illegal is distributing channels without the rights to them, which is covered at the end. The rest of this guide explains how the delivery works and what an IPTV server needs, with the arithmetic.

IPTV vs OTT vs cable: what is actually different?

All three put the same channels on a screen. The difference is the network in between, and that decides who guarantees the picture and what the cost grows with:

Cable or satelliteIPTV (managed)OTT (internet streaming)
NetworkCoax, a dish or an antennaThe operator's own managed IP networkThe public internet
Who controls the pathThe operator, end to endThe operator, end to endNobody: best effort over many networks
How a channel reaches youEvery channel is broadcast at onceMulticast: one copy per link, joined on demandUnicast: one copy per viewer, over HTTPS
Typical playerTV tuner or cable boxThe operator's set-top boxApps on TVs, phones, browsers, streaming sticks
FormatsDVB-C, DVB-S, DVB-TMPEG-TS over UDP or RTPHLS or MPEG-DASH segments
Live delayA few secondsA few secondsUsually tens of seconds; a few seconds with low-latency modes
Cost grows withChannelsChannelsViewers

The last row is the one that matters for anyone running a service. A broadcast or multicast network sends each channel once per link, so a thousand more viewers cost nothing extra. Over the internet every viewer receives a private copy, so the outgoing bandwidth of the server is viewers multiplied by bitrate. In everyday use, “IPTV” now covers both: a subscription TV app on a smart TV is OTT on the wire, even when it is sold as IPTV.

How does IPTV work?

A live channel passes through the same stages whether it ends up multicast or unicast:

  1. 1Ingest

    The signal arrives from a studio, a satellite downlink or a contribution feed from the rights holder. Over IP that is usually SRT, RTMP or an MPEG transport stream over UDP. One feed per channel, at a high bitrate.

  2. 2Encode and transcode

    An encoder compresses the picture with a codec, H.264 (AVC) for the widest device support, H.265 (HEVC) or AV1 for fewer bits at a far higher encoding cost. For the internet it builds a ladder: the same channel at, say, 1080p, 720p and 480p, so each player can pick what its connection carries.

  3. 3Package

    For managed IPTV the encoded stream stays an MPEG transport stream and goes onto the network as multicast. For OTT a packager cuts it into short segments and writes playlists: HLS (RFC 8216) or MPEG-DASH, today often with the same CMAF segments for both.

  4. 4Protect

    Paid services encrypt the segments with DRM or a conditional access system, and sign playlist URLs with short-lived tokens, so a subscription cannot simply be copied.

  5. 5Deliver

    Multicast across the operator’s network, or unicast from an origin server through edge servers or a CDN to each viewer.

  6. 6Play

    The set-top box or app asks the middleware which channels this subscriber may watch, shows the programme guide, and plays the stream.

Multicast: IPTV inside an operator’s network

In a telco IPTV network, each channel is a multicast group, an address from a range such as 239.0.0.0/8. When you switch to a channel, the set-top box sends an IGMP join for that group, and the nearest router or access switch starts forwarding the stream down your line; switching away sends a leave. However many homes in a street watch the same channel, one copy crosses the link to that street. The operator usually reserves capacity for TV on your line, which is why managed IPTV does not buffer when the household downloads something big. The public internet does not route multicast between networks, so this model only exists inside one operator.

Unicast HLS and DASH: IPTV over the internet

Over the internet the player downloads files over HTTPS. First a multivariant playlist that lists the ladder, then the playlist of one rendition, which names the latest segments:

index.m3u8 · the ladder
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=5500000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
1080p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3300000,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2"
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1700000,RESOLUTION=854x480,CODECS="avc1.64001e,mp4a.40.2"
480p/index.m3u8
1080p/index.m3u8 · a live rendition
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:2841
#EXTINF:6.000,
seg-2841.ts
#EXTINF:6.000,
seg-2842.ts
#EXTINF:6.000,
seg-2843.ts

The player keeps reloading the rendition playlist, fetches each new segment and switches rung when its measured throughput changes: that is adaptive bitrate. Because every segment is a plain file, a CDN can cache it like any image. The cost is delay: RFC 8216 tells a player not to start closer than three target durations to the end of a live playlist, so 6-second segments put a viewer at least 18 seconds behind live, before encoding and network time. Low-latency HLS (with partial segments) and low-latency DASH (with chunked CMAF delivery) cut that to a few seconds.

Middleware, EPG and catch-up

Middleware is the business layer: subscriber accounts, which packages each one has paid for, the channel list, device limits, and the menus on the set-top box or app. The EPG (electronic programme guide) is the schedule, what is on now and next, delivered as data the player renders; outside broadcast systems it is often exchanged in the XMLTV format. Catch-up TV and video on demand are recordings kept on the origin’s disks and served the same way as live segments.

What is an IPTV server?

“IPTV server” usually means the machine or machines that take channels in and send them out to viewers. Behind the name are five roles. A small service runs all of them on one machine; a large one gives each its own servers. Each role runs out of a different resource first:

RoleWhat it doesLimited by
Ingest and transcoderTakes in feeds, encodes them into a ladder of bitratesCPU (or a hardware encoder)
Packager and originCuts the encoded stream into HLS or DASH segments and stores playlistsDisk speed and RAM
Edge or delivery serverSends segments to viewersThe network port
Middleware and EPGSubscribers, entitlements, channel list, programme guideA small database; little else
Catch-up and VOD storageKeeps past programmes and filmsDisk size

The software is unglamorous and mostly open source: ffmpeg for encoding, nginx or another HTTP server to serve segments, a streaming server for ingest and packaging. A first working chain, OBS into nginx with HLS out, is in our RTMP server with nginx guide. What sets the size of the machine is not the software but the numbers below.

How much bandwidth does an IPTV server need?

Concurrent viewers × bitrate. With 1,000 viewers on a 5 Mbit/s 1080p stream, the server sends 1,000 × 5 Mbit/s = 5,000 Mbit/s, which is 5 Gbit/s. Add headroom: a port that runs at its limit queues and drops packets, and viewers see buffering. Keeping at least 20 % spare, the same rule our streaming page uses, gives this table:

Concurrent viewers at 5 Mbit/sOutgoing at peakPort with 20 % headroom
1000.5 Gbit/s1 Gbit/s
1,0005 Gbit/s10 Gbit/s
5,00025 Gbit/s40 Gbit/s
15,00075 Gbit/s100 Gbit/s
50,000250 Gbit/sMore than one server: several origins and edges, or a CDN

A few more numbers that come up when planning:

  • One port in viewers. A 1 Gbit/s port carries 200 viewers at 5 Mbit/s when completely full, about 160 with headroom.
  • Traffic per month. 5 Mbit/s is 2.25 GB per viewer-hour. A channel that averages 300 viewers around the clock moves about 486 TB in 30 days. Metered hosting bills that by the terabyte; on an unmetered port it is simply a steady 1.5 Gbit/s, which already needs a port faster than 1 Gbit/s.
  • Adaptive bitrate helps. Phones and slow connections take lower rungs, so the real average is below the top bitrate. Sizing for the top rung is the safe upper bound.
  • Ingest is small. One feed in per channel. Fifty channels at 8 Mbit/s each are 400 Mbit/s inbound, whatever the audience.

Throughput is only half of a good picture; the round-trip time between viewer and server decides how fast a segment request starts. Why those are different problems is in bandwidth vs latency.

CPU and storage: transcoding and catch-up

CPU is spent on encoding, not on serving. Sending HLS segments is file serving and costs little. Encoding a live ladder costs whole cores per rendition, all day, and HEVC or AV1 cost considerably more than H.264 for the same output. If a source already arrives in the codec and bitrate you deliver, pass it through unchanged and the CPU stays almost idle; if you transcode, count renditions × channels before you choose a machine. Hardware encoding needs a GPU or a CPU with a media engine, which most server CPUs do not have.

Storage follows from the bitrate too. One hour at 5 Mbit/s is 2.25 GB, so seven days of catch-up for one channel is about 378 GB. With a three-rung ladder of 5, 3 and 1.5 Mbit/s you store all three, about 718 GB per channel per week, and 50 channels need roughly 36 TB. Catch-up is read from many places at once, so disk speed matters as much as size.

Where do you host an IPTV server?

  • Testing, a few channels, a small audience: a Linux VPS. Build the chain, measure your bitrates and CPU load, and learn the software before paying for a big port. Within fair use a VPS port carries a modest audience.
  • A production service: a dedicated server with a port billed by its speed rather than by traffic, because live TV runs the port all day. Our streaming dedicated servers in Amsterdam come with a 10 Gbit/s unmetered port, have 40 to 2×100 Gbit/s ports on request, and have DDoS mitigation in front of every build. The IPTV and OTT section sizes ports for 1080p and 4K audiences with the same formula.
  • Past one server: keep one or two origins that ingest and package, and put edge servers or a CDN in front for delivery. Segments are cacheable files, so the origin serves each segment about once per edge, not once per viewer.

In plain words: the technology is legal, and so is running an IPTV service for content you hold the rights to, such as your own channel, a licensed sports feed, a church’s services or a hotel’s TV system. Redistributing channels without a licence from the rights holder infringes copyright, whoever hosts it and whatever it is called. Viewers are not automatically safe either: in 2017 the Court of Justice of the EU held, in the Filmspeler case (C-527/15), that selling media players preconfigured with links to unlicensed streams infringes copyright, and that watching such streams is not covered by the exception for temporary copies. Laws differ by country, and this is not legal advice.

For hosts it is simple. Hosting providers act on rights holders’ complaints, and so do we: each complaint is reviewed and infringing content is removed, under our Acceptable Use Policy. The streaming line is built for operators who deliver content they are licensed to deliver.

Frequently asked

What is the difference between IPTV and OTT?

Both deliver TV over IP. IPTV in the strict sense runs on an operator's own managed network to a set-top box, usually as multicast, so one copy of each channel crosses each link. OTT streams over the public internet as HLS or DASH, one copy per viewer, to apps on TVs, phones and browsers. Many services sold as IPTV are technically OTT.

How much bandwidth does an IPTV server need?

Concurrent viewers times bitrate, plus headroom. 1,000 viewers on a 5 Mbit/s stream need 5 Gbit/s at peak, so a 10 Gbit/s port; a 1 Gbit/s port carries about 160 such viewers with 20 % to spare. Ingest is small by comparison: one feed per channel, whatever the audience.

Is IPTV legal?

The technology is legal, and so is running an IPTV service for content you hold the rights to, such as your own channel or a licensed feed. Redistributing channels without a licence infringes copyright, and hosting providers remove infringing content when rights holders complain. Laws differ by country.

Does IPTV need a set-top box?

Operator IPTV usually comes with one, because the box joins the multicast streams and handles the operator's encryption. TV delivered over the internet (OTT) plays in apps on smart TVs, phones, computers and streaming sticks, with no special box.

Related articles

All guides