ok, i think i found the instructions to build and install gstreamer from source will try it out later.
I will try out the possible fix today/tomorrow. My plan is:
$ apt-cache depends libqt5multimedia5-plugins
libqt5multimedia5-plugins
Depends: libqt5multimedia5
Depends: libasound2
Depends: libc6
Depends: libglib2.0-0
Depends: libgstreamer-plugins-base1.0-0
Depends: libgstreamer1.0-0
Depends: libpulse0
Depends: libqt5core5a
|Depends: libqt5gui5
Depends: libqt5gui5-gles
Depends: libqt5multimediagsttools5
Depends: libqt5network5
Depends: libstdc++6
This means i have to
- Remove libraries
sudo apt-get remove libqt5multimedia5-plugins
sudo apt-get remove libgstreamer1.0 libgstreamer-plugins-base1.0 libgstreamermm-1.0
just in case
sudo apt-get remove libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamermm-1.0-dev - Build and install gstreamer 1.22.1 from source following this guide in README:
Files · 1.22.1 · GStreamer / gstreamer · GitLab - Install the libq5multimedia5-plugins again
sudo apt-get install libqt5multimedia5-plugins
Will let you know if it worked.
So this is where im at right now
sudo apt-get remove libqt5multimedia5-plugins
sudo apt-get remove libgstreamer1.0 libgstreamer-plugins-base1.0 libgstreamermm-1.0
Just in case
sudo apt-get remove libgstreamer*
VERY IMPORTNANT TO INSTALL meson as root otherwise will get build issue
$sudo pip3 install meson
$sudo pip3 install markdow typogrify
$sudo apt-get update
$sudo apt-get install ninja-build
$sudo apt install -y build-essential autotools-dev automake autoconf
libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev
pkg-config bison flex python3 git gtk-doc-tools libasound2-dev
libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev
libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes
libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev
libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev
libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev
libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev
libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev
libcurl4-gnutls-dev libdca-dev libdvdnav-dev \
Make sure to get the tarball because checkout out 1.22.1 tag from git gave me problems i could not resolve.
$wget https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.21.1/gstreamer-1.21.1.tar.gz
$tar -xf gstreamer-1.21.1.tar.gz
$cd gstreamer-1.21.1.tar.gz
FFmpeg didnt compile on my RPI4 (32-it OS), so to disable it cause got some ARMv proessor arhcitecture errors.
$meson builddir -Dgst-plugins-base:gl_winsys=egl -Dlibav=disabled
$ninja -C builddir
$meson setup builddir
$meson compile -C buildir
$sudo meson install -C builddir$ gst-launch-1.0 --version
gst-launch-1.0: error while loading shared libraries: libgstreamer-1.0.so.0: cannot open shared object file: No such file or directory
$sudo gedit /etc/ld.so.conf.d/randomLibs.conf
#add this line to the file or if the ibgstreamer-1.0.so.0 was installed somewhere else add that path
/usr/local/lib/arm-linux-gnueabihf
sudo ldconfig
$gst-launch-1.0 --version
gst-launch-1.0 version 1.21.1
GStreamer 1.21.1
Unknown package origin
When i try to run my app that uses QCamera this is the error i get:
Error: cannot create camera service, the ‘camerabin’ plugin is missing for GStreamer 1.18.
Please install the ‘bad’ GStreamer plugin package.
I will now try to compile and install the bad plugin package with -Dbad=enabled. But im not sure if it will fix this because it seems to me that when i install sudo apt-get install qtmultimedia5-dev this will automatically install and try to use the 1.18 gstreamer - this is what i conclude from that error message.
$meson builddir --reconfigure -Dbad=enabled -Dgst-plugins-base:gl_winsys=egl,wayland -Dlibav=disabled -Dgst-plugins-bad:camerabin2=enabled
$meson compile -C builddir
$meson install -C builddir
And now my QCamera app cant even detect the camera… . Before this it would detect and camera would at least make a sound. but its silent now.
Can you reccommend me some other class I could use for this camera? I see some people have used the qcam code from lib-camera. Anybody have a working project setup with that code?
All i need is to have the cameras to be able to capture pictures and control zoom from my Qt application.
I think ill try next to bring the fix commited to 1.22.1 into 1.18 gstreamer and build it from source with just that fix. cause its really just changing one row in 1 file.
I don’t know enough about GStreamer
But if you want to try this, I can give you some advice.
If you want to use qcam, it only takes a few steps
wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x ./install_pivariety_pkgs.sh
./install_pivariety_pkgs.sh -p libcamera
./install_pivariety_pkgs.sh -p libcamera_apps
./install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver
then use direct
qcam
I have also written some examples about taking pictures.
Tx, but what i will need to do is to take this QT C++ code from qcam\apps\src - libcamera/libcamera.git - libcamera official repository and put into my QT C++ app. Just a small problem is that if i build libcamera from source i do it with meson, but my application uses qmake so combining the two codebases might not be a trivial task.
So I just found out that the fix in gstreamer 1.22.1 that makes camera work with Qt is just one line in gstreamer source code. What i will try next is to check out gstreamer 1.18 source code, put that fix in it, compile and install since my qt app was able to reqonize camera when gstreamer 1.18 was installed. This is the fix if im not mistaken: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/67df248270491116af6099bf3bec5c740dfe3042
This fix didnt work out. It was either the qt plugin didnt use it, this fix wasnt enough. Theres a lot of files had changed from 1.18.6 to 1.22.1 but i think i succeeded carrying that fix over. This is what i did:
# On my Ubuntu 22.04 PC
wget https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2022-01-28/2022-01-28-raspios-bullseye-armhf.zip
git clone https://github.com/raspberrypi/usbboot.git
cd usbboot
# Flip the BOOT switch on RPI to ON
sudo ./rpiboot
wget https://github.com/balena-io/etcher/releases/download/v1.18.4/balenaEtcher-1.18.4-x64.AppImage
chmod +x balenaEtcher-1.18.4-x64.AppImage
./balenaEtcher-1.18.4-x64.AppImage
# Flashed to my RPi4 CM4
# On my RPI4 CM4
wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
2. Install libcamra-dev
./install_pivariety_pkgs.sh -p libcamera_dev
3. Install libcamera-apps
./install_pivariety_pkgs.sh -p libcamera_apps
4. Install the kernel driver
./install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver
5. Configuration
Open /boot/config.txt, under [all], add the following line:
dtoverlay=vc4-kms-v3d,cma-512
Example:
[all]
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=vc4-kms-v3d,cma-512
# Enabled i2c under interfaces
sudo raspi-config
reboot
# Compiling gstreamer 1.18
sudo pip3 install meson
sudo apt-get update
# have to use gst-build for v<19 https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html?gi-language=c
git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git
cd gst-build
$sudo apt install -y build-essential autotools-dev automake autoconf \
libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev \
pkg-config bison flex python3 git gtk-doc-tools libasound2-dev \
libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev \
libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes \
libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev \
libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev \
libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev \
libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev \
libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev \
libcurl4-gnutls-dev libdca-dev libdvdnav-dev \
meson build --buildtype=release -Dgst-plugins-good:qt5=disabled -Dbad=enabled -Dgst-plugins-base:gl_winsys=egl -Dlibav=disabled -Dgst-plugins-bad:camerabin2=enabled
# At this point i installed gstreamer tools to see if standalone gstreamer tools will play my cameras
# install a missing dependency
$ sudo apt-get install libx264-dev libjpeg-dev
# install the remaining plugins
$ sudo apt-get install libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-ugly \
gstreamer1.0-tools \
gstreamer1.0-gl \
gstreamer1.0-gtk3
# Confirmed that current standalone gsteamer plays video.
gst-launch-1.0 libcamerasrc ! video/x-raw, width=640, height=480, framerate=30/1 ! videoconvert ! videoscale ! clockoverlay time-format="%D %H:%M:%S" ! autovideosink
# This made me curious to install qt and try to run camera example project to confirm it dosent work before i try to compile & install the 1.18.6 version
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
sudo apt-get install cmake
sudo apt-get install clan
sudo apt-get install qtmultimedia5-dev
sudo apt-get install qtcreator
~/Qt/5.14.2/Examples/Qt-5.14.2$ scp -r multimediawidgets [email protected]:/home/pi/Desktop/Examples
~/Qt/5.14.2/Examples/Qt-5.14.2$ scp -r multimediawidgets [email protected]:/home/pi/Desktop/multimedia
# Built and compiled the Examples/camera in qtcreator but got error "CameraService is missing"
sudo apt-get install libqt5multimedia5-plugins
# Now i get the CameraBin error: "Failed to allocate memory". So proceed with meson compilation
# I also checked the version of different gstreamer libraries/tools i currenlty have installed
pi@raspberrypi:~/devdirs/gst-1.18.6/gst-build $ dpkg -l | grep gstream*
ii gir1.2-gstreamer-1.0:armhf 1.18.4-2.1 armhf GObject introspection data for the GStreamer library
ii gstreamer1.0-alsa:armhf 1.18.4-2 armhf GStreamer plugin for ALSA
ii gstreamer1.0-gl:armhf 1.18.4-2 armhf GStreamer plugins for GL
ii gstreamer1.0-gtk3:armhf 1.18.4-2+deb11u1+rpt1 armhf GStreamer plugin for GTK+3
ii gstreamer1.0-libav:armhf 1.18.4-3 armhf ffmpeg plugin for GStreamer
ii gstreamer1.0-omx 1.0.0.1-0+rpi12+jessiepmg armhf GStreamer OpenMAX plugins
ii gstreamer1.0-plugins-bad:armhf 1.18.4-3 armhf GStreamer plugins from the "bad" set
ii gstreamer1.0-plugins-base:armhf 1.18.4-2 armhf GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-good:armhf 1.18.4-2 armhf GStreamer plugins from the "good" set
ii gstreamer1.0-plugins-ugly:armhf 1.18.4-2 armhf GStreamer plugins from the "ugly" set
ii gstreamer1.0-tools 1.18.4-2.1 armhf Tools for use with GStreamer
ii gstreamer1.0-x:armhf 1.18.4-2 armhf GStreamer plugins for X11 and Pango
ii libgstreamer-gl1.0-0:armhf 1.18.4-2 armhf GStreamer GL libraries
ii libgstreamer-opencv1.0-0:armhf 1.18.4-3 armhf GStreamer OpenCV libraries
ii libgstreamer-plugins-bad1.0-0:armhf 1.18.4-3 armhf GStreamer libraries from the "bad" set
ii libgstreamer-plugins-bad1.0-dev:armhf 1.18.4-3 armhf GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base1.0-0:armhf 1.18.4-2 armhf GStreamer libraries from the "base" set
ii libgstreamer-plugins-base1.0-dev:armhf 1.18.4-2 armhf GStreamer development files for libraries from the "base" set
ii libgstreamer1.0-0:armhf 1.18.4-2.1 armhf Core GStreamer libraries and elements
ii libgstreamer1.0-dev:armhf 1.18.4-2.1 armhf GStreamer core development files
ii libqt5gstreamer-1.0-0:armhf 1.2.0-5.1 armhf C++ bindings library for GStreamer with a Qt-style API - Qt 5 build
pi@raspberrypi:~/devdirs/gst-1.18.6/gst-build $ apt list | grep libqt5multimedia5-plugins
libqt5multimedia5-plugins/stable,now 5.15.2-3 armhf [installed]
# Compile
pi@raspberrypi:~/devdirs/gst-1.18.6/gst-build $ cp subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c_backup
pi@raspberrypi:~/devdirs/gst-1.18.6/gst-build $ nano subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c
#Search for method gst_v4l2_object_stop and replace it with
gboolean
gst_v4l2_object_stop (GstV4l2Object * v4l2object)
{
GstBufferPool *pool;
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "stopping");
if (!GST_V4L2_IS_OPEN (v4l2object))
goto done;
if (!GST_V4L2_IS_ACTIVE (v4l2object))
goto done;
pool = gst_v4l2_object_get_buffer_pool (v4l2object);
if (pool) {
if (!gst_v4l2_buffer_pool_orphan (v4l2object)) {
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "deactivating pool");
gst_buffer_pool_set_active (pool, FALSE);
{
GstBufferPool *old_pool;
GST_OBJECT_LOCK (v4l2object->element);
old_pool = v4l2object->pool;
v4l2object->pool = NULL;
GST_OBJECT_UNLOCK (v4l2object->element);
if (old_pool)
gst_object_unref (old_pool);
}
}
gst_object_unref (pool);
}
GST_V4L2_SET_INACTIVE (v4l2object);
done:
return TRUE;
}
# Add gst_v4l2_object_get_buffer_pool methdo to the end of the file
GstBufferPool *
gst_v4l2_object_get_buffer_pool (GstV4l2Object * v4l2object)
{
GstBufferPool *ret = NULL;
g_return_val_if_fail (v4l2object != NULL, NULL);
GST_OBJECT_LOCK (v4l2object->element);
if (v4l2object->pool)
ret = gst_object_ref (v4l2object->pool);
GST_OBJECT_UNLOCK (v4l2object->element);
return ret;
}
# Add this line to subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.h at the end of /* probing */ block
GstBufferPool * gst_v4l2_object_get_buffer_pool (GstV4l2Object * v4l2object);
# Now compile gstreamer 1.18.6
ninja -C build
sudo ninja -C build install
pi@raspberrypi:~/devdirs/gst-1.18.6/gst-build $ dpkg -l | grep gstream*
ii gir1.2-gstreamer-1.0:armhf 1.18.4-2.1 armhf GObject introspection data for the GStreamer library
ii gstreamer1.0-alsa:armhf 1.18.4-2 armhf GStreamer plugin for ALSA
ii gstreamer1.0-gl:armhf 1.18.4-2 armhf GStreamer plugins for GL
ii gstreamer1.0-gtk3:armhf 1.18.4-2+deb11u1+rpt1 armhf GStreamer plugin for GTK+3
ii gstreamer1.0-libav:armhf 1.18.4-3 armhf ffmpeg plugin for GStreamer
ii gstreamer1.0-omx 1.0.0.1-0+rpi12+jessiepmg armhf GStreamer OpenMAX plugins
ii gstreamer1.0-plugins-bad:armhf 1.18.4-3 armhf GStreamer plugins from the "bad" set
ii gstreamer1.0-plugins-base:armhf 1.18.4-2 armhf GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-good:armhf 1.18.4-2 armhf GStreamer plugins from the "good" set
ii gstreamer1.0-plugins-ugly:armhf 1.18.4-2 armhf GStreamer plugins from the "ugly" set
ii gstreamer1.0-tools 1.18.4-2.1 armhf Tools for use with GStreamer
ii gstreamer1.0-x:armhf 1.18.4-2 armhf GStreamer plugins for X11 and Pango
ii libgstreamer-gl1.0-0:armhf 1.18.4-2 armhf GStreamer GL libraries
ii libgstreamer-opencv1.0-0:armhf 1.18.4-3 armhf GStreamer OpenCV libraries
ii libgstreamer-plugins-bad1.0-0:armhf 1.18.4-3 armhf GStreamer libraries from the "bad" set
ii libgstreamer-plugins-bad1.0-dev:armhf 1.18.4-3 armhf GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base1.0-0:armhf 1.18.4-2 armhf GStreamer libraries from the "base" set
ii libgstreamer-plugins-base1.0-dev:armhf 1.18.4-2 armhf GStreamer development files for libraries from the "base" set
ii libgstreamer1.0-0:armhf 1.18.4-2.1 armhf Core GStreamer libraries and elements
ii libgstreamer1.0-dev:armhf 1.18.4-2.1 armhf GStreamer core development files
ii libqt5gstreamer-1.0-0:armhf 1.2.0-5.1 armhf C++ bindings library for GStreamer with a Qt-style API - Qt 5 build
# So the packages i compiled were not replace with packages from remote repo i installed with apt-get
sudo apt-get remove gstreamer1.0-plugins-good
# Now when i do
pi@raspberrypi:~ $ gst-launch-1.0 --version
gst-launch-1.0 version 1.18.6
GStreamer 1.18.6
Unknown package origin
# But after that removal the gst-launch-1.0 cant play back camera anymore. Maybe it was my "fix" in code that broke it. Ill roll that back and rebuild
# So what i did now is that i uninstalled everything related to gstreamer
sudo apt-get remove libgstreamer* libqt5gstreamer* gstreamer1.0*
# I just try to make as full install as possible
Anyways at this point i give up and work on some other stuff. maybe over time somebody will fix it for qt5 or ill try to use libcamera instead of QCamera or ill see if my camera works in qt6.
I tried the steps you described but got error:
-bash: /usr/local/bin/qcam: No such file or directory
Also tried to build qcam from source, installed it and ran it from command line but got some errors about
arducam_64mp properties json
ok, the qcam with your script was installed to /usr/bin/qcam and it displays video. It works but the qcam i compile from source does not work with my camera. I tried both 0.0.4 and 0.0.1 versions. Can you tell me why?
when running qcam log i compiled from source:
pi@raspberrypi:/etc/ld.so.conf.d $ qcam
[0:32:25.424613004] [3172] INFO Camera camera_manager.cpp:293 libcamera v0.0.1
[0:32:25.438259682] [3175] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:32:25.438362681] [3175] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:32:25.490249207] [3175] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'arducam_64mp.json' not found for IPA module 'raspberrypi'
[0:32:25.490527018] [3175] ERROR IPARPI raspberrypi.cpp:213 Could not create camera helper for arducam_64mp
[0:32:25.490659683] [3175] ERROR RPI raspberrypi.cpp:1256 Failed to load a suitable IPA library
[0:32:25.491975739] [3175] ERROR RPI raspberrypi.cpp:1187 Failed to register camera arducam_64mp 10-001a: -22
libpng warning: iCCP: known incorrect sRGB profile
meson log:
pi@raspberrypi:~/Desktop/libcamera $ meson builddir --reconfigure
The Meson build system
Version: 1.0.1
Source dir: /home/pi/Desktop/libcamera
Build dir: /home/pi/Desktop/libcamera/builddir
Build type: native build
Project name: libcamera
Project version: 0.0.1
C compiler for the host machine: cc (gcc 10.2.1 "cc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
C linker for the host machine: cc ld.bfd 2.35.2
C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
C++ linker for the host machine: c++ ld.bfd 2.35.2
Host machine cpu family: arm
Host machine cpu: armv7l
Header "unistd.h" has symbol "issetugid" : NO (cached)
Header "stdlib.h" has symbol "secure_getenv" : YES (cached)
Compiler for C supports arguments -Wno-c99-designator: NO (cached)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /usr/bin/cmake (3.18.4)
Run-time dependency lttng-ust found: NO (tried pkgconfig and cmake)
Program ./parser.py found: YES (/home/pi/Desktop/libcamera/utils/ipc/./parser.py)
Program ./generate.py found: YES (/home/pi/Desktop/libcamera/utils/ipc/./generate.py)
Program ./extract-docs.py found: YES (/home/pi/Desktop/libcamera/utils/ipc/./extract-docs.py)
Program ./gen-tp-header.py found: YES (/home/pi/Desktop/libcamera/utils/tracepoints/./gen-tp-header.py)
Configuring version.h using configuration
Program openssl found: YES (/usr/bin/openssl)
Library atomic found: YES
Dependency threads found: YES unknown (cached)
Run-time dependency libdw found: NO (tried pkgconfig and cmake)
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Header "execinfo.h" has symbol "backtrace" : YES (cached)
Library dl found: YES
Run-time dependency libudev found: NO (tried pkgconfig and cmake)
Run-time dependency yaml-0.1 found: NO (tried pkgconfig and cmake)
Run-time dependency gnutls found: NO (tried pkgconfig and cmake)
Dependency libcrypto found: YES 1.1.1n (cached)
Executing subproject libyaml method cmake
libyaml| Found CMake: /usr/bin/cmake (3.18.4)
| Configuring the build directory with CMake version 3.18.4
| Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_POSITION_INDEPENDENT_CODE=ON
| - build directory: /home/pi/Desktop/libcamera/builddir/subprojects/libyaml/__CMake_build
| - source directory: /home/pi/Desktop/libcamera/subprojects/libyaml
| - toolchain file: /home/pi/Desktop/libcamera/builddir/subprojects/libyaml/__CMake_build/CMakeMesonToolchainFile.cmake
| - preload file: /usr/local/lib/python3.9/dist-packages/mesonbuild/cmake/data/preload.cmake
| - trace args: --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
| - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]
| Running with expanded trace output on.
| Not searching for unused variables given on the command line.
| Trace will be written to cmake_trace.txt
| -- The C compiler identification is GNU 10.2.1
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: /usr/bin/cc - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Configuring done
| -- Generating done
| -- Build files have been written to: /home/pi/Desktop/libcamera/builddir/subprojects/libyaml/__CMake_build
libyaml| CMake configuration: SUCCEEDED
libyaml| CMake project yaml has 42 build targets.
cmake-ast| Processing generated meson AST
cmake-ast| Build file: /home/pi/Desktop/libcamera/builddir/subprojects/libyaml/meson.build
libyaml| Project name: yaml
libyaml| Project version: undefined
libyaml| C compiler for the host machine: cc (gcc 10.2.1 "cc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
libyaml| C linker for the host machine: cc ld.bfd 2.35.2
libyaml| Build targets in project: 80
libyaml| Subproject libyaml finished.
Dependency libexif skipped: feature android disabled
Dependency libjpeg skipped: feature android disabled
Run-time dependency libevent_pthreads found: NO (tried pkgconfig and cmake)
Run-time dependency GTest found: NO (tried pkgconfig and system)
Looking for a fallback subproject for the dependency gtest
Executing subproject gtest
gtest| Project name: gtest
gtest| Project version: 1.11.0
gtest| C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
gtest| C++ linker for the host machine: c++ ld.bfd 2.35.2
gtest| Dependency threads found: YES unknown (cached)
gtest| Dependency threads found: YES unknown (cached)
gtest| Dependency threads found: YES unknown (cached)
gtest| Dependency threads found: YES unknown (cached)
gtest| Build targets in project: 102
gtest| Subproject gtest finished.
Dependency gtest from subproject subprojects/googletest-release-1.11.0 found: YES 1.11.0
Run-time dependency libevent_pthreads found: NO (tried pkgconfig and cmake)
Dependency qt5 (modules: Core, Gui, Widgets) found: YES 5.15.2 (cached)
Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)
Header "QOpenGLWidget" has symbol "QOpenGLWidget" with dependencies Qt5Core, Qt5Core, Qt5Gui, Qt5Widgets: YES (cached)
Detecting Qt5 tools
Run-time dependency qt5 (modules: Core) found: YES 5.15.2 (pkg-config)
Program /usr/lib/arm-linux-gnueabihf/qt5/bin/moc found: YES 5.15.2 (/usr/lib/arm-linux-gnueabihf/qt5/bin/moc)
Program /usr/lib/arm-linux-gnueabihf/qt5/bin/uic found: YES 5.15.2 (/usr/lib/arm-linux-gnueabihf/qt5/bin/uic)
Program /usr/lib/arm-linux-gnueabihf/qt5/bin/rcc found: YES 5.15.2 (/usr/lib/arm-linux-gnueabihf/qt5/bin/rcc)
Program /usr/lib/arm-linux-gnueabihf/qt5/bin/lrelease found: NO
Program lrelease5 found: NO
Program lrelease-qt5 found: NO
Program lrelease found: NO found but need: '== 5.15.2' (/usr/bin/lrelease)
Dependency glib-2.0 found: YES 2.66.8 (cached)
Run-time dependency gstreamer-video-1.0 found: NO (tried pkgconfig and cmake)
Run-time dependency gstreamer-allocators-1.0 found: NO (tried pkgconfig and cmake)
Dependency python3 skipped: feature pycamera disabled
Program doxygen found: NO
Program dot found: NO
Program sphinx-build-3 found: NO
Program sphinx-build found: NO
Configuring config.h using configuration
Program python3 (jinja2, ply, jinja2, yaml) found: YES (/usr/bin/python3) modules: jinja2, ply, jinja2, yaml
Build targets in project: 105
libcamera 0.0.1
Versions
Sources : 0.0.1
Paths
LIBCAMERA_DATA_DIR : "/usr/local/share/libcamera"
LIBCAMERA_SYSCONF_DIR : "/usr/local/etc/libcamera"
IPA_PROXY_DIR : "/usr/local/libexec/libcamera"
IPA_CONFIG_DIR : "/usr/local/etc/libcamera/ipa:/usr/local/share/libcamera/ipa"
IPA_MODULE_DIR : "/usr/local/lib/arm-linux-gnueabihf/libcamera"
Configuration
Enabled pipelines : ipu3
raspberrypi
rkisp1
simple
uvcvideo
vimc
Enabled IPA modules : ipu3
raspberrypi
rkisp1
vimc
Tracing support : NO
Android support : NO
GStreamer support : NO
Python bindings : NO
V4L2 emulation support : NO
cam application : NO
qcam application : YES
lc-compliance application: NO
Unit tests : NO
Subprojects
gtest : YES
libyaml : YES
Found ninja-1.10.1 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
ninja log:
pi@raspberrypi:~/Desktop/libcamera $ ninja -C builddir
ninja: Entering directory `builddir'
[16/233] Generating src/ipa-priv-key with a custom command
....................................+++++
.......+++++
[63/233] Generating src/libcamera/ipa_pub_key_cpp with a custom command
writing RSA key
[233/233] Linking target src/qcam/qcam
pi@raspberrypi:~/Desktop/libcamera $ sudo nina -C builddir install
sudo: nina: command not found
pi@raspberrypi:~/Desktop/libcamera $ sudo ninja -C builddir install
ninja: Entering directory `builddir'
[1/2] Installing files.
Installing include/libcamera/ipa/core_ipa_interface.h to /usr/local/include/libcamera/libcamera/ipa
Installing include/libcamera/ipa/ipu3_ipa_interface.h to /usr/local/include/libcamera/libcamera/ipa
Installing include/libcamera/ipa/raspberrypi_ipa_interface.h to /usr/local/include/libcamera/libcamera/ipa
Installing include/libcamera/ipa/rkisp1_ipa_interface.h to /usr/local/include/libcamera/libcamera/ipa
Installing include/libcamera/ipa/vimc_ipa_interface.h to /usr/local/include/libcamera/libcamera/ipa
Installing include/libcamera/control_ids.h to /usr/local/include/libcamera/libcamera
Installing include/libcamera/property_ids.h to /usr/local/include/libcamera/libcamera
Installing include/libcamera/formats.h to /usr/local/include/libcamera/libcamera
Installing include/libcamera/libcamera.h to /usr/local/include/libcamera/libcamera
Installing src/libcamera/base/libcamera-base.so.0.0.1 to /usr/local/lib/arm-linux-gnueabihf
Installing subprojects/libyaml/libyaml.a to /usr/local/lib
Installing src/libcamera/libcamera.so.0.0.1 to /usr/local/lib/arm-linux-gnueabihf
Installing src/libcamera/proxy/worker/ipu3_ipa_proxy to /usr/local/libexec/libcamera
Installing src/libcamera/proxy/worker/raspberrypi_ipa_proxy to /usr/local/libexec/libcamera
Installing src/libcamera/proxy/worker/rkisp1_ipa_proxy to /usr/local/libexec/libcamera
Installing src/libcamera/proxy/worker/vimc_ipa_proxy to /usr/local/libexec/libcamera
Installing src/ipa/ipu3/ipa_ipu3.so to /usr/local/lib/arm-linux-gnueabihf/libcamera
Installing src/ipa/raspberrypi/ipa_rpi.so to /usr/local/lib/arm-linux-gnueabihf/libcamera
Installing src/ipa/rkisp1/ipa_rkisp1.so to /usr/local/lib/arm-linux-gnueabihf/libcamera
Installing src/ipa/vimc/ipa_vimc.so to /usr/local/lib/arm-linux-gnueabihf/libcamera
Installing src/qcam/qcam to /usr/local/bin
Installing /home/pi/Desktop/libcamera/include/libcamera/base/backtrace.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/bound_method.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/class.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/compiler.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/event_dispatcher.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/event_dispatcher_poll.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/event_notifier.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/file.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/flags.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/log.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/message.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/mutex.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/object.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/private.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/semaphore.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/shared_fd.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/signal.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/span.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/thread.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/thread_annotations.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/timer.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/unique_fd.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/base/utils.h to /usr/local/include/libcamera/libcamera/base
Installing /home/pi/Desktop/libcamera/include/libcamera/ipa/ipa_controls.h to /usr/local/include/libcamera/libcamera/ipa
Installing /home/pi/Desktop/libcamera/include/libcamera/ipa/ipa_interface.h to /usr/local/include/libcamera/libcamera/ipa
Installing /home/pi/Desktop/libcamera/include/libcamera/ipa/ipa_module_info.h to /usr/local/include/libcamera/libcamera/ipa
Installing /home/pi/Desktop/libcamera/include/libcamera/camera.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/camera_manager.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/color_space.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/controls.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/fence.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/framebuffer.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/framebuffer_allocator.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/geometry.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/logging.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/pixel_format.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/request.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/stream.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/include/libcamera/transform.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/builddir/include/libcamera/version.h to /usr/local/include/libcamera/libcamera
Installing /home/pi/Desktop/libcamera/builddir/meson-private/libcamera-base.pc to /usr/local/lib/arm-linux-gnueabihf/pkgconfig
Installing /home/pi/Desktop/libcamera/builddir/meson-private/libcamera.pc to /usr/local/lib/arm-linux-gnueabihf/pkgconfig
Installing /home/pi/Desktop/libcamera/src/ipa/ipu3/data/uncalibrated.yaml to /usr/local/share/libcamera/ipa/ipu3
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx219.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx219_noir.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx290.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx296.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx296_mono.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx378.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx477.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx477_noir.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/imx519.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/ov5647.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/ov5647_noir.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/ov9281.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/se327m12.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/raspberrypi/data/uncalibrated.json to /usr/local/share/libcamera/ipa/raspberrypi
Installing /home/pi/Desktop/libcamera/src/ipa/rkisp1/data/imx219.yaml to /usr/local/share/libcamera/ipa/rkisp1
Installing /home/pi/Desktop/libcamera/src/ipa/rkisp1/data/ov5640.yaml to /usr/local/share/libcamera/ipa/rkisp1
Installing /home/pi/Desktop/libcamera/src/ipa/rkisp1/data/uncalibrated.yaml to /usr/local/share/libcamera/ipa/rkisp1
Installing /home/pi/Desktop/libcamera/src/ipa/vimc/data/vimc.conf to /usr/local/share/libcamera/ipa/vimc
Installing symlink pointing to libcamera-base.so.0.0.1 to /usr/local/lib/arm-linux-gnueabihf/libcamera-base.so
Installing symlink pointing to libcamera.so.0.0.1 to /usr/local/lib/arm-linux-gnueabihf/libcamera.so
Running custom install script '/home/pi/Desktop/libcamera/src/ipa/ipa-sign-install.sh /home/pi/Desktop/libcamera/builddir/src/ipa-priv-key.pem lib/arm-linux-gnueabihf/libcamera/ipa_ipu3.so lib/arm-linux-gnueabihf/libcamera/ipa_rpi.so lib/arm-linux-gnueabihf/libcamera/ipa_rkisp1.so lib/arm-linux-gnueabihf/libcamera/ipa_vimc.so'
pi@raspberrypi:~/Desktop/libcamera $
Can you please post what does your meson log look like?
Also i get the following error when i try to run your python examples:
pi@raspberrypi:~/Desktop/picamera2_examples $ python3 SavePng.py
Traceback (most recent call last):
File "/home/pi/Desktop/picamera2_examples/SavePng.py", line 5, in <module>
from picamera2 import Picamera2, Preview
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/__init__.py", line 5, in <module>
from .picamera2 import Picamera2, Preview
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/picamera2.py", line 22, in <module>
from picamera2.previews import DrmPreview, NullPreview, QtGlPreview, QtPreview
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/previews/__init__.py", line 1, in <module>
from .drm_preview import DrmPreview
File "/home/pi/.local/lib/python3.9/site-packages/picamera2/previews/drm_preview.py", line 6, in <module>
import pykms
File "/usr/lib/python3/dist-packages/pykms/__init__.py", line 1, in <module>
from .pykms import *
ImportError: /lib/arm-linux-gnueabihf/libkms++.so.0: undefined symbol: drmModeGetFB2
pi@raspberrypi:~/Desktop/picamera2_examples $ /libkms++.so.0: undefined symbol: drmModeGetFB2
I have 32-bit bullseye, kernel 5.10.something, RPI4 CM4
Are you using our github repository
I tested the manual compilation in the afternoon and found no problems.
I gave it one more try. Compiled qt5.15.2 from source, then cross-compiled it for RPI4, 32-bit bullseye 6.1.xx
Compiled gstreamer 1.22.1 from source that i thought has fix for it.
Then ran my qt app that uses Camera, i get the same failed to allocate required memory error.
Running gstreamer from command line gives the same error:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! fbdevsink
From this i conclude that the issue has not been fixed in gstreamer and i have to use libcamera qcam example to get qt into my raspberry qt app.
I managed to convert libcamera simple-cam meson example to QT project. I used chatgpt to convert meson.build to .pro file. For those in the future who are struggling integrating libcamera to qt i have uploaded the project to GitHub - henrihallik/simple-cam-qt: libcamera simple-cam QT project conversion.
Also chatgpt proved vital working through various linker errors that occured. So if u need more help , just ask openais chatgpt. https://chat.openai.com/chat
simple try:
write a CMakeLists.txt
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ${CMAKE_MODULE_PATH})
project(simple-cam)
find_package(PkgConfig REQUIRED)
pkg_check_modules(CAMERA REQUIRED libcamera)
#pkg_check_modules(CAMERA REQUIRED libcamera)
include(FindLibEvent.cmake)
find_package(LibEvent REQUIRED)
find_library(LIBCAMERA_LIBRARY libcamera.so REQUIRED)
find_library(LIBCAMERA_BASE_LIBRARY libcamera-base.so REQUIRED)
include_directories(. "${CAMERA_INCLUDE_DIRS}")
set(LIBCAMERA_LIBRARIES "${LIBCAMERA_LIBRARY}" "${LIBCAMERA_BASE_LIBRARY}")
add_executable(simple-cam simple-cam.cpp event_loop.cpp event_loop.h)
target_link_libraries(simple-cam "${LIBCAMERA_LIBRARIES}" event event_pthreads)
I really don’t have a lot of time to come up with some interesting examples, if anyone is interested, I hope to share them below.
I managed to compile this with QT creator installed on my RPI4
https://github.com/henrihallik/simple-cam-qt
It detects cameras when im trying to run it from terminal.
But when i try to run it from QT creator this is the error i get:
15:59:09: Starting /home/pi/Desktop/build-simple-cam-Desktop-Debug/simple-cam ...
[5:15:09.495898841] [4257] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70
[5:15:09.549464661] [4258] WARN CameraSensorProperties camera_sensor_properties.cpp:243 No static properties available for 'arducam_64mp'
[5:15:09.549611011] [4258] WARN CameraSensorProperties camera_sensor_properties.cpp:245 Please consider updating the camera sensor properties database
No cameras were identified on the system.
[5:15:09.612696470] [4258] ERROR IPAProxy ipa_proxy.cpp:149 Configuration file 'arducam_64mp.json' not found for IPA module 'raspberrypi'
[5:15:09.612852171] [4258] ERROR IPARPI raspberrypi.cpp:234 Could not create camera helper for arducam_64mp
[5:15:09.612896578] [4258] ERROR RPI raspberrypi.cpp:1352 Failed to load a suitable IPA library
[5:15:09.613289166] [4258] ERROR RPI raspberrypi.cpp:1277 Failed to register camera arducam_64mp 10-001a: -22
15:59:10: /home/pi/Desktop/build-simple-cam-Desktop-Debug/simple-cam exited with code 1
Any Ideas why this happens?
Anyways this is the log i get when running from command line:
pi@pi:~/Desktop/build-simple-cam-Desktop-Debug $ ./simple-cam
[5:14:26.195941752] [4248] INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4225-74d023d8-dirty (2023-04-02T17:35:52+03:00)
[5:14:26.229480106] [4249] WARN CameraSensorProperties camera_sensor_properties.cpp:243 No static properties available for 'arducam_64mp'
[5:14:26.229594549] [4249] WARN CameraSensorProperties camera_sensor_properties.cpp:245 Please consider updating the camera sensor properties database
[5:14:26.300895981] [4249] WARN RPI raspberrypi.cpp:1357 Mismatch between Unicam and CamHelper for embedded data usage!
[5:14:26.302617793] [4249] INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media4 and ISP device /dev/media0
- 'arducam_64mp' (/base/soc/i2c0mux/i2c@1/arducam_64mp@1a)
Default viewfinder configuration is: 800x600-NV12
Validated viewfinder configuration is: 800x600-NV12
[5:14:26.306580817] [4248] INFO Camera camera.cpp:1028 configuring streams: (0) 800x600-NV12
[5:14:26.307654266] [4249] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 1280x720-SRGGB10_1X10 - Selected unicam format: 1280x720-pRAA
Allocated 4 buffers for stream
[5:14:26.777523511] [4249] INFO V4L2 v4l2_videodevice.cpp:1820 /dev/video0[17:cap]: Zero sequence expected for first frame (got 1)
Request completed: Request(0:C:0/1:0)
Brightness = 0.500000
ExposureTime = 59994
AfState = 0
AnalogueGain = 4.302521
AfPauseState = 0
FrameDuration = 60401
AeLocked = false
DigitalGain = 1.000000
Lux = 144.655487
ColourGains = [ 1.208474, 2.763039 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 196
ColourCorrectionMatrix = [ 1.468876, -0.281766, -0.187110, -0.418329, 1.418347, -0.000029, -0.129076, -0.978665, 2.107742 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867031117000
seq: 000007 timestamp: 18867031117000 bytesused: 480000/240000
Request completed: Request(1:C:0/1:0)
Brightness = 0.500000
ExposureTime = 59994
AfState = 0
SensorTimestamp = 18867091494000
ScalerCrop = (2704, 2032)/3840x2880
ColourCorrectionMatrix = [ 1.468858, -0.281753, -0.187105, -0.418295, 1.418375, -0.000089, -0.129075, -0.978468, 2.107542 ]
FocusFoM = 233
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
ColourTemperature = 3001
ColourGains = [ 1.208955, 2.762165 ]
AeLocked = false
Lux = 168.577850
FrameDuration = 60401
AnalogueGain = 4.231405
AfPauseState = 0
DigitalGain = 2.836183
seq: 000008 timestamp: 18867091494000 bytesused: 480000/240000
Request completed: Request(2:C:0/1:0)
Brightness = 0.500000
ExposureTime = 59994
AfState = 0
SensorTimestamp = 18867151864000
ScalerCrop = (2704, 2032)/3840x2880
ColourCorrectionMatrix = [ 1.468865, -0.281758, -0.187107, -0.418309, 1.418364, -0.000065, -0.129075, -0.978546, 2.107622 ]
FocusFoM = 190
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
ColourTemperature = 3001
ColourGains = [ 1.208894, 2.762268 ]
AeLocked = false
Lux = 128.782333
FrameDuration = 60401
AnalogueGain = 4.853081
AfPauseState = 0
DigitalGain = 2.472871
seq: 000009 timestamp: 18867151864000 bytesused: 480000/240000
Request completed: Request(3:C:0/1:0)
Brightness = 0.500000
ExposureTime = 59994
AfState = 0
SensorTimestamp = 18867212230000
ScalerCrop = (2704, 2032)/3840x2880
ColourCorrectionMatrix = [ 1.468872, -0.281763, -0.187109, -0.418321, 1.418354, -0.000042, -0.129076, -0.978621, 2.107697 ]
FocusFoM = 154
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
ColourTemperature = 3001
ColourGains = [ 1.208836, 2.762367 ]
AeLocked = false
Lux = 79.876762
FrameDuration = 60401
AnalogueGain = 4.248963
AfPauseState = 0
DigitalGain = 2.824464
seq: 000010 timestamp: 18867212230000 bytesused: 480000/240000
Request completed: Request(4:C:0/1:0)
ExposureTime = 59994
AfState = 0
AnalogueGain = 4.213992
AfPauseState = 0
FrameDuration = 60401
AeLocked = false
DigitalGain = 2.847903
Lux = 4.136447
ColourGains = [ 1.208781, 2.762460 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 85
ColourCorrectionMatrix = [ 1.468878, -0.281768, -0.187110, -0.418333, 1.418344, -0.000020, -0.129077, -0.978692, 2.107769 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867245535000
seq: 000011 timestamp: 18867245535000 bytesused: 480000/240000
Request completed: Request(5:C:0/1:0)
ExposureTime = 3039
AfState = 0
AnalogueGain = 1.000000
AfPauseState = 0
FrameDuration = 33333
AeLocked = false
DigitalGain = 4.000000
Lux = 33285.511719
ColourGains = [ 1.208729, 2.762549 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 891
ColourCorrectionMatrix = [ 1.468884, -0.281773, -0.187111, -0.418345, 1.418334, 0.000000, -0.129077, -0.978759, 2.107836 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867365871000
seq: 000012 timestamp: 18867365871000 bytesused: 480000/240000
Request completed: Request(6:C:0/1:0)
ExposureTime = 120006
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120404
AeLocked = false
DigitalGain = 1.001899
Lux = 141.543564
ColourGains = [ 1.208679, 2.762634 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 492
ColourCorrectionMatrix = [ 1.468890, -0.281777, -0.187113, -0.418356, 1.418326, 0.000020, -0.129078, -0.978823, 2.107901 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867481403000
seq: 000013 timestamp: 18867481403000 bytesused: 480000/240000
Request completed: Request(7:C:0/1:0)
ExposureTime = 115188
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 115586
AeLocked = false
DigitalGain = 1.001944
Lux = 153.239243
ColourGains = [ 1.208632, 2.762714 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 505
ColourCorrectionMatrix = [ 1.468896, -0.281781, -0.187114, -0.418366, 1.418317, 0.000039, -0.129078, -0.978884, 2.107962 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867601731000
seq: 000014 timestamp: 18867601731000 bytesused: 480000/240000
Request completed: Request(8:C:0/1:0)
ExposureTime = 120006
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120404
AeLocked = false
DigitalGain = 1.001899
Lux = 147.110245
ColourGains = [ 1.208588, 2.762790 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 513
ColourCorrectionMatrix = [ 1.468901, -0.281785, -0.187115, -0.418376, 1.418309, 0.000057, -0.129079, -0.978942, 2.108021 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867722064000
seq: 000015 timestamp: 18867722064000 bytesused: 480000/240000
Request completed: Request(9:C:0/1:0)
ExposureTime = 120006
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120404
AeLocked = false
DigitalGain = 1.001899
Lux = 118.099564
ColourGains = [ 1.208545, 2.762862 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 410
ColourCorrectionMatrix = [ 1.468906, -0.281789, -0.187117, -0.418385, 1.418301, 0.000073, -0.129079, -0.978997, 2.108076 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867842402000
seq: 000016 timestamp: 18867842402000 bytesused: 480000/240000
Request completed: Request(10:C:0/1:0)
ExposureTime = 120006
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120404
AeLocked = false
DigitalGain = 1.001899
Lux = 117.870987
ColourGains = [ 1.208505, 2.762931 ]
ColourTemperature = 2999
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 412
ColourCorrectionMatrix = [ 1.468835, -0.281589, -0.187246, -0.418418, 1.418443, -0.000036, -0.129139, -0.979056, 2.108194 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18867938870000
seq: 000017 timestamp: 18867938870000 bytesused: 480000/240000
Request completed: Request(11:C:0/1:0)
ExposureTime = 96122
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 96520
AeLocked = false
DigitalGain = 1.001892
Lux = 162.922485
ColourGains = [ 1.208467, 2.762997 ]
ColourTemperature = 2999
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 462
ColourCorrectionMatrix = [ 1.468735, -0.281308, -0.187426, -0.418459, 1.418644, -0.000195, -0.129222, -0.979115, 2.108336 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868046006000
seq: 000018 timestamp: 18868046006000 bytesused: 480000/240000
Request completed: Request(12:C:0/1:0)
ExposureTime = 106798
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 107196
AeLocked = false
DigitalGain = 1.001942
Lux = 155.687180
ColourGains = [ 1.208492, 2.762952 ]
ColourTemperature = 2999
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 482
ColourCorrectionMatrix = [ 1.468801, -0.281495, -0.187307, -0.418432, 1.418511, -0.000089, -0.129167, -0.979075, 2.108242 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868159047000
seq: 000019 timestamp: 18868159047000 bytesused: 480000/240000
Request completed: Request(13:C:0/1:0)
ExposureTime = 112708
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 113106
AeLocked = false
DigitalGain = 1.001895
Lux = 150.979065
ColourGains = [ 1.208517, 2.762910 ]
ColourTemperature = 2999
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 493
ColourCorrectionMatrix = [ 1.468865, -0.281672, -0.187193, -0.418405, 1.418384, 0.000011, -0.129114, -0.979038, 2.108153 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868275349000
seq: 000020 timestamp: 18868275349000 bytesused: 480000/240000
Request completed: Request(14:C:0/1:0)
ExposureTime = 115967
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 116365
AeLocked = false
DigitalGain = 1.001933
Lux = 149.529724
ColourGains = [ 1.208540, 2.762869 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 498
ColourCorrectionMatrix = [ 1.468906, -0.281790, -0.187117, -0.418386, 1.418300, 0.000076, -0.129079, -0.979005, 2.108084 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868393448000
seq: 000021 timestamp: 18868393448000 bytesused: 480000/240000
Request completed: Request(15:C:0/1:0)
ExposureTime = 117771
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 118169
AeLocked = false
DigitalGain = 1.001941
Lux = 148.507477
ColourGains = [ 1.208562, 2.762831 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 508
ColourCorrectionMatrix = [ 1.468904, -0.281788, -0.187116, -0.418381, 1.418304, 0.000067, -0.129079, -0.978976, 2.108056 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868512546000
seq: 000022 timestamp: 18868512546000 bytesused: 480000/240000
Request completed: Request(16:C:0/1:0)
ExposureTime = 118770
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 119168
AeLocked = false
DigitalGain = 1.001926
Lux = 147.453262
ColourGains = [ 1.208583, 2.762795 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 506
ColourCorrectionMatrix = [ 1.468902, -0.281786, -0.187116, -0.418377, 1.418308, 0.000059, -0.129079, -0.978950, 2.108028 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868631820000
seq: 000023 timestamp: 18868631820000 bytesused: 480000/240000
Request completed: Request(17:C:0/1:0)
ExposureTime = 118956
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 119354
AeLocked = true
DigitalGain = 1.001912
Lux = 147.774902
ColourGains = [ 1.208602, 2.762760 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 505
ColourCorrectionMatrix = [ 1.468899, -0.281784, -0.187115, -0.418373, 1.418311, 0.000051, -0.129079, -0.978924, 2.108003 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868751576000
seq: 000024 timestamp: 18868751576000 bytesused: 480000/240000
Request completed: Request(18:C:0/1:0)
ExposureTime = 119422
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 119820
AeLocked = true
DigitalGain = 1.001938
Lux = 147.518677
ColourGains = [ 1.208621, 2.762728 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 507
ColourCorrectionMatrix = [ 1.468897, -0.281783, -0.187114, -0.418369, 1.418315, 0.000044, -0.129079, -0.978900, 2.107979 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868871588000
seq: 000025 timestamp: 18868871588000 bytesused: 480000/240000
Request completed: Request(19:C:0/1:0)
ExposureTime = 119684
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120082
AeLocked = true
DigitalGain = 1.001910
Lux = 147.343307
ColourGains = [ 1.208639, 2.762697 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 506
ColourCorrectionMatrix = [ 1.468895, -0.281781, -0.187114, -0.418365, 1.418318, 0.000037, -0.129078, -0.978877, 2.107955 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18868991750000
seq: 000026 timestamp: 18868991750000 bytesused: 480000/240000
Request completed: Request(20:C:0/1:0)
ExposureTime = 119828
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120226
AeLocked = true
DigitalGain = 1.001905
Lux = 147.228317
ColourGains = [ 1.208656, 2.762667 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 510
ColourCorrectionMatrix = [ 1.468893, -0.281779, -0.187114, -0.418361, 1.418321, 0.000030, -0.129078, -0.978855, 2.107933 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18869112004000
seq: 000027 timestamp: 18869112004000 bytesused: 480000/240000
Request completed: Request(21:C:0/1:0)
ExposureTime = 119904
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120302
AeLocked = true
DigitalGain = 1.001930
Lux = 147.188660
ColourGains = [ 1.208672, 2.762639 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 506
ColourCorrectionMatrix = [ 1.468891, -0.281778, -0.187113, -0.418357, 1.418324, 0.000024, -0.129078, -0.978834, 2.107912 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18869232280000
seq: 000028 timestamp: 18869232280000 bytesused: 480000/240000
Request completed: Request(22:C:0/1:0)
ExposureTime = 119947
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120345
AeLocked = true
DigitalGain = 1.001942
Lux = 147.154449
ColourGains = [ 1.208638, 2.762703 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 506
ColourCorrectionMatrix = [ 1.468895, -0.281781, -0.187114, -0.418366, 1.418317, 0.000038, -0.129078, -0.978882, 2.107961 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18869352573000
seq: 000029 timestamp: 18869352573000 bytesused: 480000/240000
Request completed: Request(23:C:0/1:0)
ExposureTime = 119972
AfState = 0
AnalogueGain = 5.988304
AfPauseState = 0
FrameDuration = 120370
AeLocked = true
DigitalGain = 1.001932
Lux = 147.152390
ColourGains = [ 1.208605, 2.762764 ]
ColourTemperature = 3000
SensorBlackLevels = [ 4096, 4096, 4096, 4096 ]
FocusFoM = 503
ColourCorrectionMatrix = [ 1.468899, -0.281784, -0.187115, -0.418373, 1.418311, 0.000052, -0.129079, -0.978928, 2.108007 ]
ScalerCrop = (2704, 2032)/3840x2880
SensorTimestamp = 18869472894000
seq: 000030 timestamp: 18869472894000 bytesused: 480000/240000
Capture ran for 3 seconds and stopped with exit status: 0
so the simple-cam-qt was too difficult to figure out how to modify to capture an image with set resoluton. So I converted libcameras qcam project to qt project that already has image capture functionality in it.
U can get it here if u want to:
The qcam was still too difficult to integrate. I found edwards libcamera-cpp-demo by far the simplest example to integrate libcamera to my own code:
My slightly modified version of this that specifies multiple cameras: