Now we're going to have a session of five lightning talks, five minutes, and there
is no question on yet the end. We can ask a question. And the first speaker is
today, he's going to talk about Miru, building a collaborative video editor with offline
support. Let's welcome him with a round of applause.
Hello, thanks. I'm Ty Adiyami. I started the project Miru about a year and a half ago,
and I'm building media editing tools for web apps, so they can be put into existing web
apps, or used independently. The work is funded through NGI-0, established by the NONET Foundation
and financed through the European Commission. So that's the URL of the video editor that
I'm currently working on. It's very simple, but it's also very easy to use the ideas that
you can jump in, and pretty much figure it out in five minutes. You can just add clips, rearrange,
etc. Compositing is done with the video context library for now. I'm going to move to something
better. Render to a WebGL canvas up there, and using Web Codex for exporting, which is pretty
new, not supported in all browsers yet. So actually going back, the video editor is like
the data is modeled as a tree. So the timeline is a tree of nodes. So each track is a node,
the clips in the tree are nodes. Yep. And so when I was thinking about which CRDT to use to
make this collaborative, well first, I had to pick a library. There's a lot of them. This
is a great website. Amazing. Thank you whoever made it. It lists so many different things,
and you can filter for whatever criteria you need. And my criteria were basically that I
wanted something very small, because it's an embedded editor. I wanted something also ideally
that could handle trees, but I didn't find a great one, because YGS was the most popular
great ecosystem very small. Auto merge was comparable. I think the ecosystem was smaller,
but it might have changed by now. I think it's much more actively developed. But it's
wasm build, so it's pretty big. Laura is new, has move operations, so it would be like kind
of perfect for a tree, but also wasm build. So I stuck with YGS. And then if you're building
any collaborative design software, I think it's impossible to miss like this article, especially
by Figma, creator or co-founder Evan Wallace. And I also found this, so tree-based indexing,
so basically CRDTs for trees, and it ended up being like a near-perfect fit. And then I found this
library, which like implements what was described there in YGS. So it basically you can have like
trees, directories, you can move stuff around add children, update them, and it'll make sure there's
no cycles, it doesn't break the tree or end up with duplication. But it does have the issue of
interleaving. So like if you add one to three items here and another user adds one to three,
they'll just instead of like going one after the other, they might just end up mixed up, which for
a directory is fine, because it's not exactly, it's sorted by like time of creation or name.
But in a timeline, if you have the clips just like coming up between each other doesn't make
any sense. Like for Figma, it's fine, because Figma, you are always online. There's no offline
editing, so it's not, you're not going to have the time for stuff to get interleaved. So like,
let's pretend that part is solved, I can borrow stuff from text-based CRDTs to resolve the
interleaving. But what, like, how do I figure out what the user expects to happen when they do
video editing? Like, what if they split a clip in two? So there's now two clips where they
used to be one, and then they resize these clips, but then someone else edits them, but someone else
goes back and let's say delete the original clip or changes the duration or the media source,
then how should that be resolved? There's like different ways. I used to implement this as
one, the first clip gets shorter, and then a new one is added, but that resulted in a lot of
issues, so I just kind of have to juggle things around. There's other issues, like, just the big problem
is figuring out what the expectations are, and to do that, you kind of need to know what the
intentions are, which is why you're underpacking the CRDT for a kind of every application, basically.
Like, what about subtitles and transitions and keyframe animations or, like, moving groups of things
together? I honestly don't know yet. I'll figure it out eventually, I hope. And what about weird stuff,
like, there's a diff loading here, but like, there's, in video editing, there's a concept of ripple
editing where you're editing multiple clips at the same time, basically, for specific with specific
intentions, and I'd have to, like, figure out how to make, like, sort of encode this intention
in the CRDT, and that's hard. Yeah, so just lots of user testing, lots of feedback, come to me
if you have any advice. Thank you very much.