Create Video Programmatically

shrey vijayvargiya - Jun 10 '23 - - Dev Community

Write code and get the mp4 videos as an output and no we are not using Open AI or Chat GPT

Under the Hood

The story begins when I want to create a kind of automated system for my youtube channel.

If you are new, this is my youtube channel link.

Creating systems is the first thing I usually do and love to do.

How my business runs, how my project is developed, what are the components of this system and how they are interconnected are what inspired me a lot.

Try reading about Rusell Ackoff if you want to get surprised like me.

Remotion

The story begins when I want to hire a video editor for my youtube channel.

But I couldn’t find one under my budget and how we will work together was also but tricky.

Then suddenly, my friend and I search for how to automate this youtube business system and that’s where we find this package called Remotion.

It’s basically a package that helps us to write code and convert it into a video or let’s just say write code to create a video as an output instead of a website or mobile app.

That sounds cool, we can programmatically create videos and add background sounds and transitions and so on.

I just have to write once and use it everywhere.

I mean I can easily create bookmarks, thumbnails, and watermarks once and reuse it programmatically in all of my videos.

This is just one benefit but sounds good to me for the time being.

Because I hate editing videos but I love writing code so one arrow and 2 targets are kind of a double edge sword.

This sounds good, here is the link to check the package. https://www.remotion.dev/

Templates

This is crazy

Remotion has provided tonnes of templates or already sampled videos created using a code.

We can even directly use some of them and post on youtube to check the response.

Check Templates

Templates section gives a starter video samples for better understanding.

Pros of Remotion

  • Create videos programmatically
  • Reuse concepts and save time
  • No more screenshots of code samples
  • Compatible with Reactjs
  • Chat GPT in the picture I always try to put chat GPT in every project and business nowadays.

Since we are creating videos using reactjs and that can also be done by Chat GPT itself.

Meaning reactjs code can be once written by us to create videos according to our theme and style and then we can use chat GPT to get trained and create more such videos or give react codebase for more such videos.

This will save time and cost.

  • Chat GPT can do a lot more, like writing scripts, thumbnails and descriptions and titles.
  • Chat GPT will give the best title according to the video content.
  • Chat GPT will give suggestions, colour themes, and transition styles for better videos.
  • Chat GPT can programmatically create more similar videos with different content on it s own. I can literally go on and on when it comes to the integration of chat GPT in any project and business

Docs

Do give it a try.

Setup and Installation

Remotion also provides a playground when the package is installed to play around easily with transitions, animations, previews and more properties.

The output of the video will be of course of your choice in mp4 and so on.

This is crazy and sounds interesting so do give it a try.

Conclusion

We can now write code and create videos using Remotion.

Remotion provides a playground to play and create videos, compatible with reactjs to create videos using react and has many more features.

We can use Chat GPT to create videos by giving reactjs codebase with remotion to create more similar videos.

You can even try creating multiple brand videos and selling them to small brands or freelance clients.

That’s it for today.

Keep developing
Shrey
iHateReading

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .