Skip to main content

over 3 years ago Syntax Podcast

Supper Club × Remotion React Video with Jonny Burger

Jonny Burger

Jonny Burger Guest

Wes Bos

Wes Bos Host

Scott Tolinski

Scott Tolinski Host

Topic 0 04:05

Johnny motivated to make videos in code instead of After Effects

Guest 2

just enough scripting things that it makes you feel

Guest 2

Yeah. Yeah. I know. After Effects specifically is one that gives you kind of, like,

Guest 3

it got such a Feedback that I was in in a constant feedback loop and never really had time to work on the original app. So now Remotion is my main project. Isn't that Funny how that works where Lottie, if you would just import it, Each layer lags a bit behind the previous one.

Guest 2

anytime you're used to working in WebTech, you know just how much of a pain in the butt the the scripting in in general and And, after effects can be. But not only that, like, working in, like, a vectorized context instance, so to say. I don't know what they refer to them as. And then recording doing a screen recording of that. Is that what's happening?

Guest 2

And then they build an entirely new project around that that then becomes the product. I mean, it's exactly what you're you're describing. It feels like that is

Guest 3

And my plan was to make a new app and launch it. It was like a WhatsApp sticker app.

Guest 3

SVG, you find start up ideas while building like, way for users to time.

Guest 2

in comes the web, which you can now

Guest 3

trying to coach that in React and, a web project

Guest 3

We have CSS, where And you're not able to do

Guest 2

It feels like that's happened so many times where where people work on a project, they hit a need,

Guest 2

Adjust your things to various camera sizes and and whatnot. Did you have a background specifically

Guest 3

I was definitely just a hobbyist who After Effects, but I was a much stronger If if you just use the Remotion core, I think,

Guest 3

what I would be able to do with my abilities in with Adobe programs.

Guest 3

was, I would say, pretty good at making mobile apps at that time.

Guest 3

my idea was that tools oftentimes, you are pretty,

Guest 3

with, I guess, And then I I started my experimentations

Guest 3

I I knew that's the web was very powerful for making graphics.

Guest 2

The project.

Guest 3

much longer and worked on the remotion instead.

Guest 3

it using code.

Topic 1 19:46

Video is a function from time to image

Guest 3

Packages that do all kind of things, effects, you can render anything that you want. And then as the the value As the return value of the hook changes, as the time changes, we just tell you, hey. Render something different

Guest 2

Does. Yeah. Functions all the way down.

Guest 3

this can be Lottie animations, animates for for the same time, you Always need to render the same thing. So,

Guest 3

update a react state or not, where if you think you could just invest a lot of time in it,

Guest 3

by yourself with without our package, package that you can install

Guest 3

presets allow you to use third party libraries.

Guest 3

plays not idempotent or let's say,

Guest 3

So we need a way to synchronize it. Otherwise, we cannot achieve this idempotency.

Guest 3

Yeah. So Lotte so it is an optional

Guest 3

they would just integrations Then we And we also want

Guest 3

include these types of things.

Guest 2

That it's so cool. So okay. So the other dependencies that you're in in your repo are are more or less tools to assist with video creation. So, like,

Guest 3

on your own on how to implement certain stuff. So we try to Stock prices, and then people make bots out of, that where the bot post a video every day. Yeah. Yeah. I I see this a lot with,

Guest 3

change their appearance

Guest 3

and, yeah, we also have few other Independently if you just have a time stamp and a blank canvas, it's pretty hard to animate something complicated.

Guest 2

people might not have heard of Lottie before. Do you wanna talk a little bit about how you use Lotte?

Topic 2 07:00

Successful products often come from solving dev problems

Guest 1

type of video, marketing video, or whatever TikTok video that people are are making with this? Yeah. So we try to

Guest 2

Mhmm.

Guest 1

Is there a specific

Guest 1

but I was like, okay. Like, me as a video creator, like, I'm probably not gonna use this to make my Screencast, I don't think.

Guest 1

with this type of thing? Because I was kinda looking at it. I was like, this is really cool. Some of the examples are unreal, You're just taking screenshots because, like, video is

Guest 3

allow a variety of use cases. But I can mention a few videos that that I like. For example, Declarative. You you get to frame from a try to build Products, especially for developers, if all frames are idempotent,

Guest 3

a marathon in Switzerland,

Guest 3

make the framework as generic as possible to, chunk of the and we And when I launched it, to do that.

Guest 1

Totally. Awesome. So, like, what type of videos are people making

Guest 3

and then, send a personalized video to everyone who finished the marathon and they Over late time, like, greetings from a famous, that take the duration of the videos. If your video has 900 then Kind of, proud of that they made it like that.

Guest 3

finish our videos. So they would film at the event

Guest 3

you'll end up hitting a lot of problems that that are in our stack,

Topic 3 08:35

Remotion used for marathon finish videos

Guest 2

a programmatic interface for creating videos. The next thing you know, you have All of this content that would have taken so long to do by hand. And then you you get into more tools on the web, and you could probably stitch that together in other videos or make a whole work all around it. I I see a huge amount of potential for for a tool like this.

Guest 3

And then we use

Guest 1

like right now in TikTok, the popular videos are people take a,

Guest 2

what are you using 3. Js for specifically?

Guest 2

And a template

Guest 1

you can constantly

Guest 1

data, like you said, that changes at any given time, and can pipe it in. And you don't have to specifically like

Guest 3

Very simple. So we we give you use a real React functional component You can do pretty much everything. There are no no constraints.

Guest 3

and and a way to specify frames is 30 seconds long,

Guest 3

be it weather or, like, the final image will still be smooth.

Guest 1

just pull in the fresh data, which is so cool.

Guest 2

you're passing that into

Guest 2

Dynamic video content.

Guest 3

like, I would say, like, data driven videos Nothing big came out of it, but

Guest 2

you know, that is a major strength of of programming. Right? You're able to do a lot of operations is no fun in any of those situations. Right? I mean, you You can't work with the vector tools that we know and love typically. So,

Guest 2

With, in motion graphics before this, or were you just a hobbyist?

Guest 3

over time.

Guest 3

is an is a category that where Remotion is Very strong ad where you fetch data from API, video.

Guest 2

I've dove into your your repo, and I've pulled out some dependencies. And I wanna, like, maybe talk a little bit about how you made this thing. So I I do see that you're using Turborepo

Guest 2

I have some questions eventually around the like, Converting

Guest 1

Tell your editor, all right, here's the file of data, and then they have to copy paste it in, and you have to make sure they get it right, is you could just get that hot out of an API

Guest 2

and some parameters,

Guest 2

in, you know, what would be like a project into a product. We can talk about that. But do we wanna get into the the tech stack a little bit?

Guest 3

of the canvas. And then a way And that's how you create a motion so much of it, is still unsolved.

Guest 2

I see 3 j s. I see Lottie.

Guest 1

For being able to take

Guest 2

Puppeteer.

Guest 3

the the core of which,

Guest 2

It does seem like,

Guest 2

to be able to do things rapidly that you would take forever to do by hand. I mean, I have, what, like, 400 courses on the whole of tutorials.

Guest 1

I was like, this this is unreal

Guest 2

I see FFmpeg,

Guest 1

a popular Reddit Story, and and they take, like, a video from YouTube, and then they do some AI voice on top of that. And,

Guest 3

the width and height render across like 100 Lambda functions

Guest 2

you know, over the course of data, I'm interested in, like, kind of what's doing what. In this in this type of project,

Topic 4 02:18

Johnny created Remotion 18 months ago

Guest 3

Yeah. I had a Really similar motivation for building Remotion.

Guest 1

Clean. Yeah.

Guest 3

project in the React native to create a streamlined so I put off the actual app that I wanted to do for,

Guest 1

make the size a little bit bigger and export it. Right? And someone was like, you should check out Remotion because, like, obviously, it does a lot more than that, but,

Guest 1

export your videos because I I was having to deal with this, like, weird Twitter issue where Twitter was cropping the video, and I just had to make it, like, Twenty pixels wider, and, Welcome to Syntax, the podcast with the tastiest web development treats out There. Today, we've got one for you. This is pretty cool.

Guest 1

as a way that's built in React.

Guest 3

space. And it's been about 18 months since I started Remotion,

Guest 1

like, previewer

Guest 3

until, like, 2 years ago,

Guest 1

you actually write

Guest 1

code to actually just describe where they go, and you can create different scenes and put them together. And I was like, this is this is really nifty.

Guest 1

And then putting your videos together,

Guest 1

and someone said, hey. Yeah. Like,

Guest 3

which is

Guest 1

you need to check out Remotion

Guest 1

at least the far as far as I got into it is, Oh, that's cool. We always like when people have heard of us. Like, I always have to, like, explain who we are to everybody when I bring them on,

Guest 1

I fired it up,

Guest 1

it it that's something you could do as well. So I was like, okay. I'll I'll check this out. And so I kinda went into it, and I was like it's like make videos programmatically.

Guest 1

and there's, like, this whole,

Guest 1

now I have to, like, export 2 versions of it, and it's a pain. And I was like, well, like, wouldn't it be nice if I could just, like, have a script or something that could, At the very least, just

Guest 1

to programmatically

Guest 1

So, like, why why did you make this type of thing? Is this a problem that you're trying to solve or what? Right into the video. And if there's an issue or you need to update it or anything like that,

Topic 5 15:07

Remotion has no constraints, anything that works in browser can be used

Guest 3

What we render is not necessarily what is being and also did some open source if you just,

Guest 3

over the speed, whereas with a CSS animation, it just Place in one direction Instead of

Guest 3

Something backwards or play them half the speed. You kind of have control the the web is really powerful.

Guest 3

it is Pretty hard to create complex animations with just, Each frame that you render needs to be idempotent.

Guest 3

And sometimes

Guest 3

remotion,

Guest 3

the

Guest 3

and one of the as you can imagine, if we just use this very simple technique,

Guest 3

model where everything is totally

Guest 3

CSS also gets in in in the way. So for example, CSS animations, they just Play on their own. Right? Oh, yeah. Whereas Mhmm. We have a developer, and The the stuff that developers face, I

Guest 3

React and CSS.

Guest 3

Able to A very common theme we see with successful products. I guess it makes a lot of, sense that, Wicked. Well, Johnny, thank you so much for coming on. I appreciate it. Yeah. Very happy to. I have the podcast in my player, and I was very excited when I saw the DM From you.

Topic 6 16:40

Each frame must be idempotent for parallel rendering

Guest 3

Johnny, just explain to us. Yeah. You can you can kind of think of a video as a

Guest 3

or, like, random random values.

Guest 2

Yeah. That's way more intense than I think I was getting from the the surface of things. Can we ex I'll explain to our audience really quickly,

Guest 1

because I know there's a lot of new developers listening, and they probably are hearing the word idempotent about making videos programmatically in React. Yeah. Nice. That's like, this is really cool because so I'll tell you how I stumbled across it. So I've been making short form content,

Guest 3

you cannot use CSS animations

Guest 2

Both a larger and a much smaller degree. I'm impressed with just how much of this is,

Guest 2

like, a true

Guest 2

True video editor style of things where, like you said, because each frame is always going to be the same, You can step through your animations and always know that this thing is always going to exactly how you'd expect Final Cut Pro to work, right, or any of that stuff.

Guest 1

thing, it will give you the same thing every single time. And because of that, you get all the benefits that,

Guest 1

and not not understanding what that is. We talk about this On the podcast every now and then is, pure function.

Guest 1

It will always, always, always return the exact same thing. That's beautiful because people always ask like, Oh, why, like, why do you need pure Pure functions and and idempotent JavaScript. This is a really good example of why you would need that because,

Guest 3

based on the time. And it is kind of beautiful because And, include Lottie animations in your And

Guest 3

Now we actually we we have Two types Necessary I I guess we don't use Puppeteer anymore. We have kind of inlined that all in,

Guest 3

just opening 1 chrome tab, we can actually open 4 or 8 chrome tab Recently, I experimented with rough JS function that takes in a current time and

Guest 3

But I think it's very important that we introduce these rules I was already making videos before with the Adobe Suite used Remotion to to batch make, it back together, and then it's a super fast render. Oh, super fast render. You could literally spin up, like,

Guest 1

Meaning that no matter you could you have a function,

Guest 3

video, and, then we concatenate

Guest 3

where you can distribute your Video And there's also that makes it so that I realized it's it has some beauty in it. Yeah.

Guest 3

and paralyze the rendering because, await something, where each Lambda function renders one Yeah. I guess it's a Swiss thing. I'm from Zurich, Switzerland.

Guest 1

and given that you pass it in some data, like you have a A animation, you say give me frame 7.

Guest 2

2 2,000 Lambda servers, and and all of them render 1 frame and then shut down. I mean, it's like having, like, a a Pixar studio, you know, where they have Rendering tiny little bits of animation across several computers. I remember doing that in college, and, like, this is that same thing, but to

Guest 3

And as an extension for that, we have also made something like, that we call Remotion Lambda

Topic 7 12:10

Remotion uses Puppeteer and FFmpeg to render React components

Guest 1

limit subset of something? But it's It's full blown whatever works in the browser and you could take a screenshot of. Right? Yeah. Exactly. And,

Guest 2

So so what What are you doing? Are you are you rendering Yeah. I do see, like, a motion blur package as well inside of here, and that feels to me like it would be a particularly challenging issue.

Guest 3

So

Guest 3

to await, are usually,

Guest 3

It's, it's not a screen recording because So implementation called camera motion blur,

Guest 1

like like, a whole rendering engine and whatnot. But, like, The rendering engine is Chrome. And because of that, you have

Guest 3

Sort of. So, all the time. Uh-huh. So there are some use cases

Guest 1

that

Guest 2

FFmpeg.

Guest 2

tree into

Guest 3

Iterate over displayed in the real time in the browser. Mhmm. And we can also, for example, If I could just make a bunch of screenshots of web pages and then

Guest 3

So that way the the render will maybe not be in real time if it is a complex project, just that it Returns a And there are, like, various other For making, like, some hands drawn type of stuff, a different image, one hook. It's called use current frame most difficult ones for users to get right is that

Guest 3

But we can ensure that there are no flakers, and everything is, very smooth. I I don't know why I'm so surprised play but we wait for all that to be to be done.

Guest 3

most because then we can also parallelize the render I think GIFs, and we pack them up so that you can use them in remotion.

Guest 3

that way we we also of Remotions'

Guest 1

all of CSS available and all of HTML available and all of React because that was my next question is, like, Can you use all of CSS, or is it like this, like, React Native thing where, like, you gotta use your own

Guest 3

and FFmpeg I could probably make something that that looks better than Canvas. We can do three d stuff.

Guest 2

a puppeteer, How how does that all fit into the the puzzle here? Yeah. So motion blur, it's something that

Guest 3

But what we do is we open a Chrome browser, we load the codes that you have written,

Guest 3

to encode the video. I would say these are the That's one thing that I was

Guest 2

the current react

Guest 2

so much yet. Okay. I have a I have a time and and a blank canvas. Can I can I, sorry? Can I have you elaborate just a little bit on that puppeteer,

Guest 3

Puppeteer to make screenshots of that which, the idea is Very

Guest 3

set the time, take a screenshot, set the time again, and screenshot it again. So we That's we make a lot of images.

Guest 1

screenshots. It's just lots of small images played at a frame per second, and then it's smooth to us. But,

Guest 3

that we need to have.

Guest 2

and Yeah? and Vite and PNPM, so all the the cool stuff for the build tools. But in terms of, like, actually creating

Guest 1

For some reason, I thought that there would be a lot more,

Guest 3

we ensure that there are no frame drops. So You can make, like, really complex stuff that maybe takes, like, 2 seconds to render in a in a browser, shortly before lunch, I decided, okay, I need to make a a launch video.

Topic 8 21:45

Helper packages add functionality beyond core Remotion

Guest 3

And on each iteration, it changes the time stamp a you would have this problem that it just normal regular projects all the time, It was necessary for them to create network requests, for example, or any asynchronous operations.

Guest 2

are those like,

Guest 3

mix blend mode property, like 12 lines of codes,

Guest 3

and, make each layer a bit less transparent.

Guest 3

you pass some it's a React high order component, and by the way, a really simple which uses the CSS I guess what's the drawback of it is that, in our codes to make it a bit more efficient.

Guest 2

Is the the motion blur and trail effects you're doing, you're the the the thing that you have that is the need in your workflow ends up becoming Powerful, but at the same time,

Guest 3

yeah, is pretty advanced. And you can even set like a So we have a bunch of helper packages very simple. And with just that,

Guest 3

do it. And provide a bunch of helper Regardless of whether you

Guest 3

where it just takes any React markup And duplicate it.

Guest 3

The first one is put that together and code that into a video, you can do in most Video editing programs. So we also need to have a way to

Guest 3

little bit so that things that

Guest 3

the blur depends on which way your Camera is set up.

Guest 3

blur effect. You you duplicate it

Guest 3

shutter angle so you can say, okay, implementation React hook and render something, and you're also runner.

Guest 3

of blur.

Guest 3

And that was the naive Implementation, As I said, if you just have a time Okay. Maybe we should start with,

Guest 3

and then there's, like, the sophisticated it would be so great.

Guest 3

Because rules to

Topic 9 00:36

Making videos programmatically with React

Guest 1

Programmatically

Guest 2

Hair programming,

Guest 2

the fastest way to build modern websites. And Tupelo, an app built specifically for remote I could generate an introduction video for every single one of my courses simply based out of the data we have in our database

Guest 1

a couple of years ago, I would have said, what are you talking about? But I stumbled upon this project a couple Couple days ago only, and, I was like, this is really cool. We gotta get Johnny on to talk about it. So,

Guest 1

making videos using React.

Guest 1

What? Like, if you would have said that was a sentence,

Guest 2

giving you high resolution

Guest 1

2 awesome companies today. Gatsby, regardless of how many times you request Frame 32 of this

Guest 2

screen sharing and low latency remote control.

Guest 1

we are sponsored by or when I propose that they come on the podcast. And then a lot of people are like, Yeah. I've been listening for a couple years. Or, yeah, I've part a couple episodes here and there, so that's really cool.

Topic 10 00:00

Transcript

Announcer

This

Announcer

so buckle up and grab that old handle because this ride is going to get wild.

Announcer

is the Syntax supper club.

Announcer

I sure hope you're hungry.

Announcer

Wash those hands, pull up a chair, and secure that feed bag, because it's time to listen to Scott Talinsky and Wes Bos attempt to use human language to converse with and pick the brains of other developers. I thought there was gonna be food,

Announcer

Oh, I'm starving.

Topic 11 01:23

Johnny excited to be on Syntax podcast

Guest 1

So do you wanna give us a quick rundown of who you are and what you do and what Remotion is? You can take as long as short as you want. Yeah. Sure. My name is Tony Burger. In America, they call me Tony Burger. Both is fine. Is that your is that your real last name? That is my my real last name.

Guest 3

I've been a app developer previously the the idea of how Remotion works is

Share

Empowering developers for over 286197176823 milliseconds!