cblavier

cblavier

Generating images or videos with Scenic

Hi there!

I need to generate videos on the fly from user input.

I already implemented this feature with NodeJS deployed on AWS Lambda: for each video, we generate 300 PNG and merge them with FFMpeg to get a 10sec video at 30 FPS.

To generate the PNG, we manipulate headless HTML5 canvas and do simple text writing, geometry and animations.

Since we are already using Elixir a lot, and will eventually need to embed this video generation technology into Raspberries (think Elixir Nerves), I am starting to think that Elixir Scenic would be a great choice.

Is there already a feature (Scenic Driver ?) to record scenes as PNG or movies?

Any software architecture advice would be really welcome!
And of course, @boydm I would love to hear your thoughts :slight_smile:

Most Liked

boydm

boydm

Creator of Scenic

Hi!

Great question. I’ve previously built experimental scenic drivers that record and play back movies, but it was at the primitive level and focused on extreme compression. So not really what you are going for.

Tell me if I’ve got this right: I think you really want a way to capture the finished frame buffer so that you can compress it and assemble it into a movie in whatever way makes sense for you. This isn’t currently a feature of the driver, but that doesn’t mean it couldn’t be.

Any such feature would be driver specific, meaning non-portable if someone is using a different driver. This isn’t an issue today as there really only is one driver, but that will change in the future.

Are you familiar with the framebuffer level of coding with OpenGLES? I am swamped with other work right now and wouldn’t be able to get to something like this for a bit. It is a good idea tho, so any initial research would help kick it along…

axelson

axelson

Scenic Core Team

Since you’re using Raspberry PI’s I think you can use rpi_fb_capture to capture the Raspberry PI framebuffer from /dev/fb0. @lawik has a great write-up here: Underjord | Case Study: Inky - An elixir library

You’d probably have to adjust it slightly since you’re not using inky, but I think you could use that approach to generate a series of images (and then FFmpeg or similar to join them into a video)

cblavier

cblavier

I actually need a solution that will work both on serverside and embedded in nerves! But I’ll check your solution anyway, thanks

Where Next?

Popular in Questions Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54120 245
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement