Developer Chats: Theo Browne

0:00

If you upload a

0:00

five gigabyte video file,

0:02

most people shouldn't

0:03

be watching

0:03

a five gigabyte video.

0:04

They should be watching a 50

0:05

to 100 megabyte

0:06

chunk of the video

0:07

that is where they stop

0:08

playing at.

0:09

And this is why

0:10

I want to chat with you all,

0:11

because Mux is

0:12

probably the best way

0:13

right now

0:14

to turn a video asset

0:15

in some bucket,

0:15

like Uploadthing or S3

0:17

into a good quality

0:18

streaming experience

0:19

for all of your users.

0:21

Meet Theo Brown.

0:23

You might already

0:24

recognize him,

0:24

but if you don't...

0:26

For those who don't know

0:26

me, I'm Theo.

0:27

I used to work at Twitch.

0:28

I quit to join a startup

0:29

and make my own.

0:30

I'm deep

0:31

in the world of tech,

0:32

software engineering,

0:33

content creation, video,

0:35

audio -

0:35

my degrees

0:36

audio engineering,

0:36

funny enough -

0:37

mostly known nowadays

0:38

for the YouTube channel,

0:39

but I tend to put my heart

0:41

in open source and full stack

0:42

software development.

0:43

I largely

0:43

lean in the

0:44

TypeScript direction.

0:44

I'm I'm proud to say that I'm

0:45

the second best

0:46

TypeScript YouTuber.

0:47

So yeah, if you're interested

0:48

in those types of things,

0:49

you should check out

0:49

my YouTube channel T3.gg

0:51

Who's a who's the first best?

0:52

Matt Pocock, of course.

0:53

Okay, I'm

0:54

gonna give a shout out

0:55

to where credit's due there.

0:57

After his time

0:57

at Twitch,

0:58

Theo went on to create tools

0:59

like Ping

1:00

for collaborative streaming

1:01

and the increasingly

1:02

popular Uploadthing,

1:04

which simplifies

1:05

file uploading.

1:06

We'll talk about that

1:07

career transition

1:08

along with the nitty

1:09

gritty stuff:

1:10

like the engineering

1:11

complexity of file

1:12

uploads, how

1:13

he leverages the Mux

1:14

API, and a lot more.

1:16

Let's get into it.

1:17

Did you have a video angle

1:19

going into Twitch

1:20

before you even

1:21

joined the company?

1:22

Or what was your intro

1:23

to video?

1:24

I was always a bit

1:25

nerdy about video cause

1:26

I come

1:26

from the skateboarding world,

1:27

so I would record and edit

1:28

stuff there.

1:28

I even had an English class,

1:30

I think, my

1:30

sophomore year of high school

1:31

where I was doing

1:32

a lot of video recording,

1:32

I owe that teacher,

1:34

a call

1:34

because of how much

1:35

that definitely impacted me.

1:36

But from like

1:37

that point forward,

1:38

I didn't really do

1:39

much with video.

1:40

I was still pretty deep

1:41

in the music world,

1:41

but video

1:42

just kind of eluded me.

1:44

I was at Twitch,

1:45

and my favorite thing

1:46

about working at a company

1:47

like Twitch

1:47

especially, was the lunches

1:49

and dinners,

1:49

because I could sit

1:50

with a bunch

1:50

of more experienced

1:51

engineers

1:52

talking about things

1:53

I didn't understand at all,

1:54

and just slowly, through

1:55

osmosis, learn more and more,

1:56

ask stupid questions,

1:58

and level myself up.

1:59

Eventually,

1:59

I started learning about fun

2:00

new tools and technologies,

2:02

solving my own problems,

2:03

and got to bring that

2:04

to the conversation.

2:05

And it was so rewarding

2:06

to get to sit down

2:07

and have those talks.

2:08

And then Covid hit

2:10

and I lost that very,

2:11

very quickly.

2:12

So I quit

2:13

and joined a startup,

2:14

and I was the most

2:15

technical person

2:15

at that startup.

2:16

Nobody wanted to nerd out

2:17

about tech with me,

2:18

so I quit

2:18

and made my own startup.

2:19

And I got into Y Combinator,

2:21

and I was like, “oh

2:21

my God, I'm

2:22

going to be surrounded

2:22

with like,

2:23

the top crop,

2:24

like the ultimate nerds.

2:25

This is going to be great.

2:26

I can finally nerd

2:26

out again.” Nobody wanted to.

2:29

That's when I realized

2:30

two things.

2:31

First, since we're building

2:32

tools for video

2:33

creators,

2:33

which we'll get to in a bit,

2:35

I wanted to better understand

2:36

their needs.

2:37

And also,

2:37

I missed having these deep

2:38

technical convos

2:39

so much

2:39

that I had to do

2:40

something about that.

2:41

So I ended up

2:43

starting YouTube primarily

2:44

to learn about our users

2:46

and to fill that deep

2:47

hole in my heart of, “wow,

2:49

I just want to nerd out

2:49

about tech

2:50

and nobody else wants to.”

2:51

There was already

2:51

so much content

2:52

for learning how to code.

2:53

I know how to code.

2:54

I'd been coding for ten years

2:55

at that point.

2:55

I didn't want to learn how.

2:57

I want to talk about

2:58

the crazy things

2:58

I experienced,

2:59

and I quickly went

3:00

from just a new guy

3:01

on YouTube

3:01

to 4 million views a month,

3:03

with a million and a half

3:04

viewers every month now.

3:06

Was there something

3:07

from Twitch

3:08

like the switch

3:09

that was like,

3:10

like most people

3:10

still don't think, like,

3:11

okay, I'm going to go start

3:12

my own business

3:12

as a result of this.

3:13

When I was at Twitch

3:14

I always had a bit of the,

3:15

like, startup energy

3:17

where I was trying to

3:17

to rethink

3:18

how we were doing things -

3:19

that energy

3:20

just kept me motivated -

3:21

I loved doing that.

3:22

Like showing, “this doesn't

3:23

have to be so complicated.

3:24

You guys are making things

3:25

way more difficult

3:25

than they need to be.” Around

3:27

this time, Twitch was trying

3:28

to turn their infrastructure

3:29

into a product on AWS

3:31

called IVS.

3:32

I personally was disappointed

3:33

that both Twitch

3:34

the like creator company

3:36

and like viewer experience

3:37

Plus the AWS side weren't

3:39

really giving WebRTC

3:41

a fair shake,

3:42

and I felt like WebRTC

3:43

had a ton of benefits

3:44

that weren't

3:45

being explored properly.

3:46

The quality

3:47

that I had been seeing for

3:48

my experimentation was nuts,

3:49

and I wanted to

3:50

play with that more.

3:51

So I built a small demo app

3:52

just to put myself and others

3:54

inside of like

3:55

one window together

3:56

with a specific goal

3:58

that I'd gotten

3:58

after watching other creators

3:59

doing like live

4:00

collaborations -

4:01

where it was so hard

4:02

to just manage

4:03

all of the people in the call

4:05

at once to do something

4:06

like a game show

4:06

live on Twitch.

4:08

So I built a quick demo

4:09

app using WebRTC to showcase

4:10

what this could look like.

4:11

And I showed that

4:12

to my best friend Gunrun.

4:13

as soon as I showed him

4:14

this project,

4:14

he just looked at me

4:15

in the eyes and said, “Theo

4:16

how much do I have to pay you

4:17

to work on this full time

4:18

because we need this

4:19

at Vshojo.

4:20

At which point

4:21

I put

4:22

my two weeks into my job.

4:23

I went all in on that.

4:25

And within the first week

4:26

that I had that product,

4:27

like even existing,

4:29

we had some of the

4:30

biggest streamers

4:30

like Sykkuno and Ironmouse

4:32

streaming to over

4:33

20,000 people

4:34

live in the video

4:35

- I ultimately got over

4:36

a million plays

4:37

from the first ever stream

4:38

done with this hacky tool

4:39

I had just built.

4:40

And I was hooked.

4:41

I wanted to see how much

4:42

we could

4:43

impact the idea

4:44

of collaborative content

4:45

on Twitch

4:45

and other platforms.

4:47

All the products

4:47

that existed

4:48

kind of felt like scratch

4:49

and your options

4:50

were scratch or assembly.

4:51

There was nothing in

4:52

the middle at all.

4:53

And that's

4:53

what I wanted to build,

4:54

something that integrated

4:55

with existing professional

4:56

tools like OBS,

4:58

but also lets

4:58

you have high

4:59

quality interactive,

5:01

like embedded video

5:02

from our platform, Ping.

5:04

And I really feel like

5:04

we captured

5:05

the best of both worlds

5:05

there. And the market agreed.

5:07

We still to this day,

5:09

I think

5:09

four of the top

5:10

ten streamers on Twitch

5:11

still use Ping

5:12

for a bunch of stuff.

5:13

We have a ton of podcasts.

5:14

We have big companies

5:14

like Xbox using us

5:15

for all their stuff too

5:16

- really proud

5:17

of what we built with Ping,

5:19

but the market was admittedly

5:20

quite small

5:20

and we learned so much

5:21

from building it

5:22

that we leaned more

5:23

into the developer tools

5:24

direction afterwards.

5:25

So does

5:26

some of these developer tools

5:27

do they come out, of,

5:29

basically

5:30

like concepts or abstracts

5:32

that were built within Ping

5:34

when you were,

5:34

when you were

5:34

working on that?

5:35

Yes, every tool

5:37

we've built for

5:38

developers

5:38

is a direct result

5:39

of a problem

5:40

that we were experiencing.

5:42

The big product that we have

5:43

now, Uploadthing -

5:44

it's blowing up like mad.

5:45

We get 700

5:46

new users a day right now.

5:47

I still can't believe

5:47

the success

5:48

we've been finding with that.

5:49

I've been asking

5:50

for that product

5:51

for three years

5:51

before we shipped it.

5:52

I'd been begging on Twitter.

5:53

You can find tweets

5:54

as early as 2020,

5:55

2021 of me

5:56

saying, “why is S3

5:58

still the most complex

5:58

thing to set up?” “Why

5:59

is it easier to make

6:00

a globally

6:01

distributed database

6:02

with like fault, sick

6:03

like fault tolerance

6:04

and all these

6:04

other crazy features

6:05

than it is to upload

6:06

a single profile picture

6:07

safely to your service?”

6:08

It just deeply irked me

6:10

and I wanted

6:11

someone to fix it.

6:12

Nobody did.

6:13

I started building a product.

6:14

I can actually show

6:14

it super quick.

6:16

Imgthing is a tool I built

6:17

for just managing

6:18

my funny faces

6:19

for my thumbnails.

6:20

It will automatically

6:21

remove the background

6:22

and give me a one click

6:23

to copy it to my clipboard.

6:24

So I'd go drop it in

6:24

something like Affinity,

6:25

which is what I use

6:26

for my thumbnails.

6:27

The hardest part of building

6:28

this ended up being S3

6:29

and I was so frustrated

6:30

with that.

6:31

So frustrated

6:32

that I was complaining

6:32

to my CTO.

6:33

We sat down,

6:34

we evaluated other options.

6:36

We looked at

6:36

all of the existing

6:37

S3 alternatives,

6:38

and all of them

6:38

were trying

6:39

too hard to be S3 compatible

6:40

and not hard enough

6:41

to be actually different.

6:42

So we built our own custom

6:44

thing.

6:45

We wrote a little

6:46

like TypeScript

6:47

sample function of what

6:48

it could look like to do this

6:49

safely.

6:50

Quickly hacked it out

6:50

and as soon as I started

6:52

showing it to other people,

6:53

the feedback felt

6:55

very different.

6:56

So many people started

6:57

hitting me up.

6:57

Like way more than I ever

6:58

would have expected.

6:59

Like, “where's uploadthing,

6:59

where's uploadthing?

7:00

Where's uploadthing?

7:01

I need this right now.”

7:02

And I realized, like,

7:03

this has been a

7:03

hole for a while.

7:05

What is it

7:05

that most people

7:06

don't realize about

7:08

the complexity

7:09

of file uploads

7:10

that

7:11

actually makes it harder

7:12

than it seems on the surface?

7:14

It seems simple,

7:15

and the things

7:16

that seem simple tend

7:17

to be the most dangerous.

7:18

There is no one big thing

7:20

that's like, “here's

7:20

the big thing you're doing

7:21

wrong with file

7:22

uploads in S3,”

7:23

but there's a ton of medium

7:24

sized ones

7:25

that when they add up, result

7:26

in tons of things

7:27

like vulnerability,

7:28

security issues,

7:29

and just fundamentally

7:30

bad experiences for the users

7:31

and the developers.

7:32

There's two ways to do file

7:34

uploads, generally speaking.

7:35

You can have a file

7:36

go to your server

7:37

and then your server

7:38

sends it to S3.,

7:39

but then you're eating

7:40

ingress and egress.

7:41

Or you can do a presigned

7:42

post URL,

7:42

which is when your server

7:43

creates a URL

7:44

that allows the user

7:45

to upload straight to S3,

7:46

except

7:47

how do you now know

7:48

when the upload is completed?

7:50

On top of all of this,

7:51

there's tons of unexpected

7:52

cost issues too.

7:53

Like,

7:53

the way that S3 is priced

7:55

isn't just based on

7:56

how many files

7:57

you have uploaded, or

7:57

how much storage

7:58

you're using,

7:59

it's based on

7:59

the egress costs

8:00

of how much are these files

8:01

being accessed,

8:02

which is incredibly hard

8:03

to predict,

8:03

especially if your website's

8:04

like getting scraped by bots

8:05

all of a sudden.

8:06

Those costs can

8:07

get astronomical. I want to,

8:10

reference

8:10

really what

8:12

initiated this

8:13

call in the first place,

8:14

which was a tweet

8:14

that you sent out

8:15

that was like, “Uploadthing

8:16

plus Mux is an

8:17

underrated combo.

8:18

Maybe you could share

8:19

a little bit more

8:20

about what you were thinking

8:20

with that?

8:22

Uploadthing’s goal

8:23

is to be the best experience

8:24

for a user uploading content

8:26

to your service.

8:27

So files of any sort,

8:29

of course, work

8:30

great with Uploadthing.

8:31

The most common use case

8:31

we've seen

8:32

is actually PDFs

8:32

of all things.

8:33

But video is an incredibly

8:35

underrated use case

8:36

because the upload experience

8:37

for video kind of sucks

8:38

because the files are so big.

8:40

If your internet connection

8:40

isn't good

8:41

and you have like

8:41

a single blip,

8:42

the recovery for

8:43

that is obnoxious

8:44

to get right.

8:45

In the way we have presigned

8:46

PUTS implemented with retries

8:47

and things

8:47

on the client gives

8:48

both the user

8:49

a good experience

8:50

and makes the file

8:51

more likely to get to you

8:51

in the first place.

8:52

And I'll be really honest

8:54

with this...

8:54

just streaming

8:55

a file from S3 sucks.

8:57

It's not a good experience.

8:58

If you just have an MP4 in S3

9:00

and you just embed that

9:01

in your web service,

9:02

it's not going to

9:02

be a good time.

9:03

It just doesn't work great.

9:05

Services like Mux

9:06

handle this stuff

9:07

incredibly well.

9:07

That's why they exist.

9:09

Mux is probably

9:10

the most effectively priced,

9:12

especially when you consider

9:12

like the quality of service

9:13

that you're getting there,

9:14

both for live video

9:15

and for like traditional VOD

9:17

based video.

9:18

It's what I've used on all

9:19

my services hosting video

9:20

for five years now, roughly.

9:22

I've been hyped on

9:23

what Mux is doing

9:24

since back in 2019,

9:25

and it just

9:26

plugs in really nicely.

9:27

You give Mux a URL to a file,

9:29

it can be from anywhere,

9:30

as long as it's on

9:30

the internet,

9:31

and Mux will turn that

9:32

into a streamable asset.

9:33

So as long as you have

9:34

things set up

9:35

with Uploadthing

9:36

and you're letting users

9:36

upload those files,

9:37

it's effectively

9:38

three lines of code right now

9:39

to add Mux

9:40

as the next step for that.

9:42

We want to simplify

9:42

it even further

9:43

and build a plugin

9:44

so that your service,

9:45

our service

9:46

and Mux

9:47

can all be intertwined

9:48

even more seamlessly

9:49

so you know when the uploads

9:50

complete

9:50

in a non-blocking way.

9:51

But that's one more small

9:53

step in the crazy process

9:54

that we're engaged in

9:54

and I'm really excited

9:55

to see where it goes.

9:57

What is the next step

9:58

for Uploadthing in terms of,

10:00

like, the evolution

10:01

of where it is now

10:02

and where you hope

10:02

to take it?

10:03

Maybe there's more that you

10:04

you want to express there.

10:05

There are so many fun things

10:06

we want to do

10:07

with Uploadthing.

10:08

The big arc we're focused on

10:09

right now

10:09

is mobile support,

10:10

because mobile in file

10:11

uploads is a rough experience

10:14

to say the least.

10:15

We have found

10:15

so many fun things

10:16

through this process, like,

10:18

did you know

10:18

that React Native

10:19

doesn't have any way

10:20

to handle like chunk progress

10:22

in presign PUT or post?

10:24

Which is just insane.

10:25

You can't know

10:25

how much progress you have

10:26

on your upload

10:27

on React Native.

10:27

You just might know

10:28

when it's done.

10:29

We're working

10:30

with the core React

10:31

native devs as well as Expo

10:32

to fix those types of things.

10:34

So it's not just Uploadthing

10:35

that will be better,

10:35

it's theoretically

10:36

the entire ecosystem

10:37

will have better experiences

10:39

as a result of this,

10:40

but we're just digging

10:40

into the weeds of every place

10:42

where uploads

10:42

aren't quite ideal,

10:44

and we're trying to fix that.

10:45

One of the things

10:46

that that we face

10:48

sometimes at Mux is

10:51

the engineer

10:51

that knows everything,

10:53

that knows

10:54

they can set up the video

10:56

infrastructure pipeline.

10:57

It's not that big of a deal.

10:58

Is there something

10:59

similar that you feel

11:01

from the upload

11:01

side of things?

11:02

What do you have to say

11:03

to somebody like that to

11:05

help them understand

11:06

the problem space

11:07

or help them to, like,

11:09

see that there's more to it

11:11

than than meets the eye.

11:13

I had the same reservations.

11:15

I see really against service

11:16

providers for things

11:17

like auth, because like,

11:18

is it really that hard

11:19

to roll your own auth?

11:20

And then I started

11:21

having outages

11:22

because of random

11:22

weird changes

11:23

that auth

11:23

providers were doing

11:24

with their OAuth.

11:25

And around the same time

11:26

I was trying

11:27

to build a mobile app,

11:27

which setting up auth

11:29

for was miserable

11:29

and around that same time

11:31

I discovered Clerk.

11:31

So I gave it an honest

11:32

try and

11:33

was blown away

11:33

with how much easier

11:34

it was and over time,

11:35

how much easier

11:36

to maintain it was.

11:37

And I realized, like,

11:38

yes, I could have

11:38

rolled auth myself,

11:40

but then I would be

11:41

rolling auth myself

11:42

for a couple hours

11:43

every month

11:44

just to make sure everything

11:45

was still working.

11:46

Or I could use the service

11:47

and not worry

11:48

about it anymore.

11:49

And that realization was huge

11:51

for me.

11:51

We've accepted that

11:53

the way we used

11:53

to do things works,

11:55

but it's more complex

11:55

than it needs to be

11:56

for the majority of people.

11:57

That's what you guys

11:58

are doing with Mux

11:59

and that's

11:59

what we're doing

11:59

with Uploadthing.

12:01

Is there anything

12:02

in parallel

12:03

there to the reason why

12:05

Uploadthing is open source

12:07

or why

12:08

you prioritize your work

12:10

to be open source?

12:11

Open source

12:12

is super important to me

12:13

for a bunch of reasons.

12:15

The big one here is that

12:17

this is code

12:17

you're running

12:18

on your service

12:19

and I didn't want to give you

12:21

a bundle of code

12:21

that you can't

12:22

read, understand,

12:23

make changes to, etc.

12:25

On top of that,

12:26

I have an incredible

12:27

community of developers

12:28

who are just

12:29

so kind and thoughtful

12:31

with not just

12:31

how they interact

12:32

in my community,

12:32

but the contributions

12:34

they make, the questions

12:34

they ask,

12:35

all these types of things,

12:36

and those types of

12:37

people are much easier

12:38

to find

12:39

when you're open source.

12:41

And on

12:41

top of all of that, like,

12:42

I'm just proud of the project

12:43

and the quality

12:44

that we built.

12:45

Well truly Theo, thanks.

12:46

Thanks for taking

12:47

some time out to share this.

12:49

I feel like uploading

12:49

is sort of this

12:50

just, like,

12:51

overlooked space

12:52

where it's like, “how,

12:53

well,

12:53

there's native elements

12:54

in the browser,

12:54

how hard could it be?”

12:55

And you don't know

12:56

until you find

12:57

out the hard way.

12:58

And so to me,

12:59

this is a really

13:00

interesting project

13:01

to see how we can

13:02

sort of make

13:02

uploading easier,

13:03

across services

13:05

and across applications.

13:07

So thanks

13:07

for taking some time

13:08

to share with us today.

13:09

Anything else

13:09

closing comments

13:10

or thoughts from your side?

13:11

Uploading is only

13:12

half the story,

13:13

and I really want

13:13

to emphasize that point.

13:14

We've handled

13:15

that incredibly well,

13:16

but people have been memeing

13:17

about when's Downloadthing

13:18

going to happen for a while.

13:19

And while, yes,

13:20

you can just go to the URL

13:22

and download

13:22

the thing,

13:23

it's a lot of stuff

13:24

where that's not ideal,

13:25

especially with video.

13:26

And my call

13:27

to action to the chat here in

13:28

the comments is to ask ya’ll,

13:30

what do you want

13:31

in order to make Uploadthing

13:32

plus Mux a better experience?

13:34

We've been planning

13:34

on this plugin

13:35

architecture for a while,

13:36

but I want to know,

13:37

what are you guys

13:37

doing with Uploadthing?

13:38

What are you guys

13:39

doing with Mux?

13:39

What are the pain points

13:40

you're currently experiencing

13:41

so we can make sure

13:42

if and when we build this,

13:43

its the best

13:44

possible experience

13:45

for people

13:45

trying to make

13:45

great interactive

13:47

video and audio and

13:48

uploading experiences.