Open Akascape opened 2 years ago
There is a simple capture module on moderngl-window we thought about porting into arcade. It simply pipes raw frames in stdin : https://github.com/moderngl/moderngl-window/tree/master/moderngl_window/capture
You can probably easily adapt that one to arcade.
I am still confused on what to do :(, can't we just get the frames by any method and use opencv to convert it?
I guess you could check out the VideoWriter
in opencv, but I haven't used that before.
To access the raw pixel data from the window framebuffer you can window.ctx.screen.read()
to get the byte data.
@einarf Ya, I know about the VideoWriter
method of opencv, but we have to get the frame data of the window one by one to write the video.
You know how to get the frame data now. Be free to ask questions if you are stuck. We also have a discord server that might be a better place to have conversations about this. The plan was to add a simple capture module in arcade 2.7 at some point, so maybe this can help getting the work done.
@einarf I have used this method cv2.imwrite("out.png", self.ctx.screen.read())
to write the image file but this is giving errors.
I think opencv wants a numpy array with a certain shape and data type. When asking for help you should always include the actual error.
Again: Discord is better for this if possible
@einarf Discord link?
Front page in arcade docs.
Given this is now a unique ticket, I crossed it off of #1342.
I created a shader filter and used it with a video as an input channel, it is working properly but I want to save the rendered frames and make a video out of it.
Code:
Is there any way to save the new rendered frames and make a video? Please help :)