〜StreamUI: Make videos with SwiftUI

A few weeks ago I wanted to make some simple Tiktok videos for a project. I was using capcut but I wanted to pull in images and data from my db. I really didn't want to have to manually do this for each video (which was going to follow a similar format). Around this time I came across projects to programmatically generate videos in react/js (https://www.remotion.dev and https://re.video). I tried them out but I thought it would more fun to use SwiftUI. So I decided to build a similar project using Swift and SwiftUI (For example, this video is made entirely with SwiftUI: https://youtu.be/pdnPG4BywBQ)

After building a POC I realized I could render videos in real time whereas the other libraries suggest you use serverless functions to render your videos in a parallel way (since they are doing the rendering in a browser).

When I realized this, I then had a crazy idea that I could support live streaming. So, for example, you could have a live streamed video purely written in swift receiving events from the outside world, making calls to your database and updating the stream in realtime based on that data :exploding_head:. I got it working with the HaishinKit library and I was live streaming a view in SwiftUI to my VLC (I'll put together a better example later but here is what I mean: https://youtu.be/3nwJvGGJaXw)

Id love any feedback! Still very much in a beta, but i've used it to make some videos and personally I like the DX more than other libraries


I'm not sure how many will have use cases for this, but Remotion has 22k stars. (Obv I don't have all the functionality of it right now). But I feel like some pretty fun stuff could be built ;p


This is fantastic, thank you for making this! Coming from the world of AVVideoComposition, it’s refreshing seeing a different way of laying out video content.

1 Like