Video Education: What is SRT?

0:01

SRT is an open source

0:02

contribution protocol

0:04

for moving video

0:05

between two points.

0:07

It's a protocol designed for

0:09

reliability and high quality

0:10

video delivery, even when the

0:12

network is less than perfect.

0:14

I know what you're

0:15

all thinking.

0:16

Isn't that a subtitles format?

0:18

We're talking about

0:19

Secure Reliable Transport.

0:21

Confusing that there's two video

0:23

related acronyms for SRT?

0:25

Yeah, really annoying.

0:26

Believe it or not, SRT has

0:27

been around about a decade

0:29

at this point, originally

0:30

demoed by Haivision at

0:32

IBC back in 2013, and then

0:35

open sourced a couple of

0:36

years later on GitHub.

0:38

If you're already

0:38

live streaming, then

0:40

you're probably live

0:40

streaming over RTMP.

0:42

RTMP is ultimately connection

0:44

oriented, it works over TCP.

0:46

It's really easy for a TCP

0:48

connection to get dropped,

0:49

or a bit of packet loss, or

0:51

a bit of jitter, and to cause

0:52

a live stream to run into

0:54

network connectivity problems.

0:56

And that means you're

0:57

kind of only one dropped

0:58

TCP connection away

1:00

from an interruption

1:01

to your live stream.

1:02

Under the hood SRT is working

1:04

at a different network layer,

1:06

running over UDP rather than

1:07

TCP, so you don't have that

1:09

connection oriented component

1:11

of the communication.

1:13

All of the reliability

1:14

features are implemented at

1:15

the protocol level instead.

1:17

Obviously, if some packets

1:18

go missing, some packets

1:19

do occasionally go missing,

1:20

SRT holds a buffer on both

1:22

ends of the connections.

1:23

And the size of this buffer

1:24

is configurable when you

1:25

connect to an SRT endpoint.

1:27

And so, for example, you

1:28

have a second of frames on

1:30

either end of the connection.

1:31

And then if some packets get

1:33

lost or reordered, You can

1:35

resend those lost frames to

1:38

fill that gap in the buffer.

1:39

Obviously, interestingly,

1:40

what this means is you

1:41

can trade off latency for

1:43

reliability within SRT.

1:44

So if you increase your buffer

1:46

size, there's more opportunity

1:48

to recover if you do encounter

1:50

those horrible internet

1:51

connectivity problems.

1:53

And SRT is a great option

1:55

for all of those social,

1:57

user generated video apps

1:59

that you've been building

2:00

on mobile recently.

2:01

Because, hey, you're more

2:02

likely to be connected

2:03

over WiFi or a cellular

2:06

network where SRT can shine.

2:08

So that's SRT, a modern,

2:10

reliable ingest protocol,

2:12

much better than RTMP, that

2:14

lets you improve reliability

2:16

of your live streams.

2:18

It's now GA on Mux.

2:19

That's where I work.