On this page
The formulas
Short answer: a stream needs viewers × bitrate of egress, plus headroom; a transfer takes size in bits ÷ link speed; and a rate held for a month adds up to rate × seconds in the month ÷ 8 bytes. Everything else on this page is those three lines with units attached.
egress (Mbit/s) = viewers × bitrate per viewer
port to plan for = egress × 1.25 (25 % headroom)
transfer time (s) = size (bytes) × 8 ÷ (link (bit/s) × payload share)
traffic (bytes) = rate (bit/s) × seconds ÷ 8
30-day month = 2,592,000 seconds
1 Gbit/s × 2,592,000 s ÷ 8 = 324,000,000,000,000 bytes = 324 TBVideo bitrates and what they add up to
The bitrates below are common targets for H.264 at 30 frames a second, not a standard: an encoder set to a different rate, 60 frames a second, HEVC or AV1 change them. Per hour is for one viewer; the last two columns are the port to plan for, with 25% headroom.
| Stream | Bitrate | Per viewer per hour | 100 viewers | 1,000 viewers |
|---|---|---|---|---|
| 480pSD, 854×480 | 1.5 Mbit/s | 675 MB | 188 Mbit/s | 1.88 Gbit/s |
| 720pHD, 1280×720 | 3 Mbit/s | 1.35 GB | 375 Mbit/s | 3.75 Gbit/s |
| 1080pFull HD, 1920×1080 | 6 Mbit/s | 2.7 GB | 750 Mbit/s | 7.5 Gbit/s |
| 4KUHD, 3840×2160, HEVC or AV1 | 20 Mbit/s | 9 GB | 2.5 Gbit/s | 25 Gbit/s |
With adaptive streaming (HLS or DASH) the player switches between renditions, so the egress is a mix: plan with the rendition most viewers watch, and with the highest one for the worst case. Audio adds about 0.1 to 0.2 Mbit/s per viewer, which the presets include.
Port classes in numbers
What each common port speed carries per second, what it moves running flat out for a 30-day month, and how many viewers of a 1080p stream at 6 Mbit/s it serves with 25% headroom.
| Port | Per second | In 30 days, flat out | 1080p viewers |
|---|---|---|---|
| 1 Gbit/s | 125 MB/s | 324 TB | 133 |
| 10 Gbit/s | 1.25 GB/s | 3.24 PB | 1,333 |
| 40 Gbit/s | 5 GB/s | 13 PB | 5,333 |
| 100 Gbit/s | 12.5 GB/s | 32.4 PB | 13,333 |
| 2×100 Gbit/s | 25 GB/s | 64.8 PB | 26,666 |
Bits and bytes
Links and ports are sold in bits per second (Mbit/s, Gbit/s, often written Mbps and Gbps); files and download dialogs count bytes (MB, GB). A byte is 8 bits, so divide a link speed by 8 to get bytes a second: 100 Mbit/s is 12.5 MB/s and 1 Gbit/s is 125 MB/s. Both use decimal prefixes in networking. Operating systems often print file sizes in binary units (1 GiB = 1,073,741,824 bytes) under the name GB, which is why the calculator offers MiB, GiB and TiB as well.
Why 25% headroom
- Bitrates peak. A variable-bitrate encode averages its target but runs above it in fast scenes; a constant-bitrate encode still fluctuates at the segment level.
- Viewers arrive together. The start of an event, a goal or a link shared in a chat sends hundreds of players to the same segments within seconds.
- A full port queues. Near line rate, packets wait in buffers and are dropped, TCP slows down, and players fall back to a lower rendition or stall. Every viewer sees it, not only the last one in.
25% is a planning figure, not a law: an audience that grows during an event needs more, a steady 24/7 channel with a known audience less.
Protocol overhead
A link never carries its full rate as file data. With TCP over Ethernet and the usual 1500-byte MTU, each full frame takes 1538 bytes of wire time (1500 bytes plus 14 header, 4 checksum, 8 preamble and 12 inter-frame gap) and carries 1448 bytes of data (1500 minus 20 for IP, 20 for TCP and 12 for the timestamp option, which Linux uses by default). That is 94.1%, so about 6% goes to headers. TLS, acknowledgements and retransmissions take a little more, which is what the “about 10%” setting allows for. Both are estimates; a measured transfer is the real answer.
Measuring a server’s real throughput
The figures above are arithmetic. To see what a server and the path to it really carry, measure with iperf3 between two machines you control, and watch the interface counters while real traffic flows (the options are in the iperf3(1) and vnstat(1) man pages):
iperf3 -s # on the receiving server
iperf3 -c SERVER_IP -P 4 -t 30 # from the client: 4 parallel streams for 30 s
iperf3 -c SERVER_IP -P 4 -t 30 -R # the other direction (server sends)
vnstat -m # traffic per month on a server running vnstatTesting a VPS or server’s network step by step with speedtest, iperf3 and mtr, and reading the results, is in how to test VPS network speed. A fast port does not make a far-away server feel close: bandwidth vs latency explains the difference.
One server or a CDN
A single origin serves about a hundred viewers of a 1080p stream on a 1 Gbit/s port and over a thousand on a 10 Gbit/s port, as the table above shows. Past that, or for viewers spread across continents, a CDN caches the segments close to them and the origin only feeds the CDN, which needs a small fraction of the egress. To run the origin yourself, setting up an nginx RTMP server takes a stream from OBS and serves it as HLS.
Frequently asked
How much bandwidth do I need to stream to 1,000 viewers?
Multiply the viewers by the bitrate each one receives. 1,000 viewers of a 1080p stream at 6 Mbit/s need 6 Gbit/s on average, 7.5 Gbit/s with 25% headroom, which is a 10 Gbit/s port. At 720p and 3 Mbit/s it is 3 Gbit/s, or 3.75 Gbit/s with headroom. Above a few thousand viewers a CDN usually carries the delivery instead of one server.
How much data does 1 Gbit/s transfer in a month?
About 324 TB in a 30-day month if it runs flat out: 1 Gbit/s is 125 MB a second, and a 30-day month has 2,592,000 seconds. 10 Gbit/s moves about 3.24 PB. Real traffic has a daily curve, so a port that peaks at 1 Gbit/s typically moves a fraction of that.
How long does it take to transfer 100 GB over 1 Gbit/s?
13 min 20 s at the full line rate (100 GB is 800 gigabits), about 14 min 10 s after the roughly 6% that TCP and Ethernet headers take, and closer to 15 minutes in practice. That assumes the disks and the slowest link on the path keep up; a transfer runs only as fast as its slowest part.
What is the difference between Mbps and MB/s?
Mbps (Mbit/s) counts bits, the unit of link and port speeds; MB/s counts bytes, the unit of file sizes and download dialogs. One byte is 8 bits, so 100 Mbit/s is 12.5 MB/s and 1 Gbit/s is 125 MB/s, before protocol overhead.
How much data does a 1080p stream use per hour?
About 2.7 GB per viewer per hour at 6 Mbit/s (6 Mbit/s × 3,600 s ÷ 8). A 720p stream at 3 Mbit/s uses about 1.35 GB, a 4K stream at 20 Mbit/s about 9 GB. The bitrate the encoder is set to decides it, not the resolution alone.