[libcamera-devel] Getting 30fps from libcamerasrc

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Jul 31 22:21:14 CEST 2022


On Sat, Jul 30, 2022 at 05:05:08PM +0200, Pavel Machek wrote:
> Hi!
> 
> > > So... with some hacks, I can get 30fps 2MPix recording on
> > > pinephone... from the "cam" utility. Which will have trouble with
> > > audio.
> > 
> > Indeed :-) "cam" is meant to be a test tool, not an end-user
> > application, so you've certainly reached the limits of its scope if you
> > want audio.
> 
> Yes. I'm just wondering if three letter name is too short for such
> a testing tool... and at some point we'll need
> this-takes-pictures-and-records-videos-on-phones application.

"cam" matches the level of naming creativity of "libcamera" ;-) I'm not
against renaming it at some point if it causes issues, but I think (and
hope) we'll have an ecosystem of desktop, tablet and phone camera
applications, without any one in particular claiming the "cam" name.

> > > When I try to use libcamerasrc (and gstreamer), I get down to 10fps or
> > > so, but it looks more like artifical limit then performance one. Is it
> > > so? How can I request 30fps?
> > 
> > What gstreamer pipeline do you use ? I don't have a pinephone, but
> > running
> > 
> > GST_PLUGIN_PATH=$(pwd)/src/gstreamer gst-launch-1.0 \
> > 	libcamerasrc camera-name='\\_SB_.PCI0.RP05.PXSX.TBL3.TBTU.RHUB.UB32-2:1.0-046d:0893' ! \
> > 	'video/x-raw,width=1280,height=720' ! \
> > 	fpsdisplaysink sync=0 text-overlay=false video-sink=glimagesink -v
> > 
> > on my laptop with a UVC webcam gives me 30fps. Can you try something
> > similar, possibly using the a fakesink first, on the pinephone ?
> 
> So I went down to 160x120, and did not get 30fps, not with
> fpsdisplaysink, not with other stuff. I'm using JPEG
> (not enough memory bandwidth to unached RAM for anything else).
> 
> fpsdisplaysink needs jpeg decoding, which is cpu hungry, so I'm
> using fakesink with num-buffers and time the whole pipeline.
> 
> CPU is not at 100% during testing. I'll get exact commands when
> I'm near computer.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list