Introduction

libcamera is an open source camera stack for many platforms with a core user space library, and support from the Linux kernel APIs and drivers already in place. It aims to control the complexity of embedded camera hardware by providing an intuitive API and method of separating untrusted vendor code from the open source core.libcamera aims to encourage the development of new embedded camera applications by limiting the complexity that developers have to deal with. The interface is designed around the way that modern embedded camera hardware works.

This page dedicated to validating raw video captured using libcamerasrc using gst-launch-1.0 in RPI-3 B+ board using imx219 camera.

libcamera camera stack


The camera stack comprises four software layers. From bottom to top:

libcamera usage

Connecting camera to Raspberry pi board

Refer below link to connect camera to pi board

connecting camera to Raspberry pi board

Build and Flash Procedure

Refer below link to build camera image

RDK-C rdk-next Yocto 3.1 dunfell build for Raspberrypi

Configuration

1.Stop rms-launcher and mst-launcher using below command(this are temporary procedure to validate raw video content.)
 #systemctl disable rms-launcher
 #systemctl disable mst-launcher
2.Add below lines to /boot/config.txt
  dtoverlay=imx219
  core_min_freq=300
3.Save the file and reboot the target.

libcamera video validation procedure

STEP 1:

Execute below command inside target.

#gst-launch-1.0 libcamerasrc ! video/x-raw,width=1280,height=720,framerate=30/1,format=NV12 ! videoconvert ! v4l2h264enc ! queue ! filesink location=libcamerasrc.h264

STEP 2:

copy the libcamerasrc.h264 file to computer(DESKTOP)

STEP 3

play video using vlc player

Demo Video