Follow

I have published the snippet of code that implements a GPU-based ISP with bunch of corrections and encodes video in real time on the Librem 5. Feel free to take parts of it and use in your apps and frameworks... or record your cats 😼

source.puri.sm/-/snippets/1223

@dos

Ladies, gentlemen and enbies of the Fedi... the circle is now complete. We have mobile Linux cat videos on The Fediverse.

#LinuxMobile #Cats #Fediverse #Librem5

@dos Thank you! Viewfinder is upside down for me, and it has tendency to crash the camera (or system) as described in the README. I do not see crashes with my code (https://gitlab.com/tui/tui/-/tree/master/icam?ref_type=heads), but I'm doing _way_ simpler processing; I did see memory corruption with my version at one point, through. I'm using YUY2, and 1024x... 30fps recording is feasible with simple shaders.

@pavel It shows the right way and runs reliably for hours here on crimson. There should be no crashes whatsoever. Could be some regression on GStreamer side, but on newer distros you should rather use GTK4 and GtkGraphicsOffload instead anyway.

Of course simpler shaders allow for higher performance, the challenge is in simplifying the shader without making the output shitty ;)

@pavel ...and remember that it won't work on byzantium/bullseye.

@dos For the record, I'm on Mobian 13 aka Trixie. I did single-bit change to get the viewfinder right side up. I'll play some more.

- "! gtkwaylandsink name=gtkwaylandsink rotate-method=1 sync=false "
+ "! gtkwaylandsink name=gtkwaylandsink rotate-method=3 sync=false "

@pavel rotate-method sets what gets passed to wl_surface::set_buffer_transform verbatim, and the camera is rotated 90° counter clock-wise in relation to the screen, so it should be 1. Unless I'm getting something wrong, it smells like a bug in newer phoc.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml