[libcamera-devel] libcamera on pinephone

Eric Curtin ecurtin at redhat.com
Mon Jun 20 13:20:23 CEST 2022


On Mon, 20 Jun 2022 at 08:50, Pavel Machek via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> Hi!
>
> I'd like to get video recording to work on pinephone. I had solution
> with gstreamer (https://gitlab.com/tui/tui/-/tree/master/cam), but
> gstreamer stopped working (claims colorspace problems and refusees to
> source data) so I'm looking at other solutions.
>
> What is good way to test libcamera? I'd preffer not to complicate it

Personally, I find the SDL sink of libcamera the best if you don't
care about the specifics, it's the most portable, it's the only one
I've got working on all of x86, raspberry pi, m1, etc. It works with
Wayland, X11, KMSDRM etc. It's also the only way that supports pixel
format conversion and decompression (MJPEG decompression) for cam
application.

I would actually like to see someone getting that working on Android,
because it has support for that too, but anyway.

Some example cam CLI examples (examples can be dependant on platform,
hardware, etc).

List available cameras:

$ sudo cam -l
[1:25:26.406638277] [4423]  INFO Camera camera_manager.cpp:293
libcamera v0.0.0+3649-9fd3ccd2
Available cameras:
1: Internal front camera (\_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-04f2:b64f)

Run unlimited frames with SDL sink:

$ sudo cam -c1 -S -C0

Run unlimited frames with KMS sink:

$ sudo modetest | grep connected
95 94 connected eDP-1          340x190 1 94

$ sudo cam -c1 -DeDP-1 -C0 -s pixelformat=YUYV

> with gstreamer so far, but I don't see good test application and
> README does not suggest a way to start.
>
> build/test/camera/capture -- sounds like something suitable for basic
> testing? But it has "platform/vimc.0 Sensor B" hardcoded and that's
> not present.
>
> Are there tools such as list sensors, acquire one frame for testing,
> ...?
>
> Best regards,
>                                                                 Pavel
> --
> People of Russia, stop Putin before his war on Ukraine escalates.



More information about the libcamera-devel mailing list