membrane

thomascothran 2021-08-29T19:00:20.013700Z

Membrane looks really interesting! I love the idea, but I'm trying to think through the tradeoffs of abstracting over the platforms for my use cases. For example, suppose I have a telestration application. The general idea is that users can play and pause video, put animations on a canvas, record their work, and export it to another video file. Here's an https://www.youtube.com/watch?v=T4CL7M_DyXI in action. It looks like there aren't video primitives in membrane yet? In the browser, it's fairly trivial to connect a video to a canvas element, use OpenGL to draw on that canvas, and then save it. It looks like to play video, I'd have to handle all the drawing at a fairly low level.

phronmophobic 2021-08-29T19:13:53.014600Z

membrane also has a webgl backend, so it would be possible to mix and match

phronmophobic 2021-08-29T19:14:42.015600Z

I’m on vacation at the moment, but I’ll try to take a look at your example soon.

phronmophobic 2021-08-29T19:15:35.016300Z

Is the app primarily targeting the web, another platform, or multiple?

thomascothran 2021-08-29T19:19:44.018400Z

Right now the application is entirely on the web. But ideally, we'd have something that runs on desktop (Mac and Windows) and the web

phronmophobic 2021-08-29T19:20:37.019Z

ah ok. I’ve been looking at https://github.com/cnuernber/avclj for video on desktop

phronmophobic 2021-08-29T19:20:46.019500Z

but haven’t implemented it yet

phronmophobic 2021-08-29T19:21:44.020600Z

what are the options for drawing videos to canvas on the web? I thought that was more of a pain

thomascothran 2021-08-29T19:24:06.022700Z

It's pretty easy (a couple lines of code IIRC). The big win for us is being able to take separate canvases, feed them into a single canvas, and store that as a video. For example, there's a canvas with the video, and a canvas with the animations you want in the final telestrated video.

thomascothran 2021-08-29T19:25:25.024Z

Being able to abstract the video/telestration piece across platforms would be huge, but we also have a fairly niche use case. Realistically, we'll probably end up with Electron in the short term

👍 1
phronmophobic 2021-08-29T19:34:58.026400Z

If canvas does what you want and you must support the web, that seems like a pretty good option. I think membrane might be more interesting if you didn’t need to support the web. Since the web options are so good, I’ve been focusing more on other platforms like desktop, mobile, and terminal.

phronmophobic 2021-08-29T19:35:36.027400Z

If you wanted to try membrane anyway, I’d be happy to help make it work for you though.

thomascothran 2021-08-29T19:48:43.029500Z

That's useful to know, thank you. I suspect in the short- to medium-term, we'll use Electron because it's easy (esp. for the JS developers). My own interest was less business-case oriented, and more thinking through what I could use membrane for. Having an abstraction over desktop/mobile/web that is data-oriented and idiomatic in Clojure is something I've been looking for. Using React Native with ClojureScript is the closest thing for this right now. I'll work through the tutorial.

👍 1
phronmophobic 2021-08-29T19:51:15.031200Z

Sounds good, let me know if you have any questions, comments, or criticisms