[libcamera-devel] Video recording on PinePhone Re: libcamera on pinephone

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jul 4 20:23:22 CEST 2022


Hi Pavel,

On Mon, Jul 04, 2022 at 06:15:26PM +0200, Pavel Machek via libcamera-devel wrote:
> Hi!
> 
> > Hey, got it working!!
> > 
> > qcam -r gles -spixelformat=SBGGR8,width=1280,height=720 -platform xcb
> 
> Congratulations :-).
> 
> I got video recording back to work in the meantime. libcamerasrc does
> not work for me, so I'm using (patched) gstreamer to do the recording.
> 
> Best I can do is
> 
> AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
> VIDEO:  1267x712  30.000 fps    0.0 kbps ( 0.0 kB/s)
> 
> as I'm doing compression on CPU.
> 
> Code is at git at gitlab.com:tui/tui.git, cam directory, see the .diff and
> cam script.
> 
> Question is how to do this properly. Ideally, I'd like megapixels-like
> application, that would do viewfinder, take photos, and record videos.
> 
> qcam looks like a step in right direction, but .. it needs two streams
> to be able to take photos, and we don't that capability on pinephone.
> 
> For taking photos, I see two possibilities:
> 
> a) Do the viewfinder in low resolution, then switch to high
> resolution, take a photo, and switch back. Unfortunately pipeline
> reconfiguration is rather slow (> 2 seconds?) on pinephone.

2 seconds is a lot, there may be a way to reduce that, it should be
investigated.

> b) Run the chip in high resolution all the time, downscaling for
> viewfinder. Should result in less shutter lag, but viewfinder will be
> limited to 15 fps and will need more cpu power.

Could the GPU be used to scale the full resolution down ?

> For taking videos... is there possibility to do encoding without
> gstreamer? libcamerasrc does not work for me :-(.

I'd like to fix libcamerasrc if it doesn't work on the PinePhone.
There's ongoing work on colorimetry support by Rishikesh as part of his
GSoC (initial patches are on the list) which should help. What are the
other issues ?

> Camera seems to be
> able to do JPEG natively, does it make sense to try to get that to work?

That's an option, but if you want to have a viewfinder at the same time,
you would then need to decompress the frames. Furthermore, MJPEG for
videos isn't great, as the compression ratio will be low.

Any hope of getting the A64 video encoder to work ?

> Any ideas how to proceed?

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list