64MP libcamera-vid mjpeg full resolution : Not enough buffers provided by V4L2VideoDevice

I need to use the 64MP camera to capture mjpeg pictures. I have a IMX519 and this feature works great.
It woks on the 64MP but only at 16MP resolution. If I up it to the maximum I get the message below. In short it is the “ERROR: *** failed to allocate capture buffers ***” error.

I Have a 4 GB pi 4B and I’ve switched off desktop. Has it simply run out of memory. Would an 8GB pi work? Could anyone test it? Hopefully there is a simple work around otherwise the purchase has been wasted.

Thanks in advance

libcamera-vid -t 500 --width 9152 --height 6944 --codec mjpeg -o test%05d.jpeg --segment 1
rm: cannot remove ‘test*.jpeg’: No such file or directory
WARNING: consider inline headers with ‘pause’/split/segment/circular
Preview window unavailable
[2:19:17.431690372] [1748] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3572-e13ccdd5
[2:19:17.435043287] [1750] WARN CameraSensorProperties camera_sensor_properties.cpp:163 No static properties available for ‘arducam_64mp’
[2:19:17.435086268] [1750] WARN CameraSensorProperties camera_sensor_properties.cpp:165 Please consider updating the camera sensor properties database
[2:19:17.435594912] [1750] ERROR CameraSensor camera_sensor.cpp:591 ‘arducam_64mp 10-001a’: Camera sensor does not support test pattern modes.
[2:19:17.457758695] [1750] WARN RPI raspberrypi.cpp:1263 Mismatch between Unicam and CamHelper for embedded data usage!
[2:19:17.458371115] [1750] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[2:19:17.458673668] [1750] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/[email protected]/[email protected] to Unicam device /dev/media3 and ISP device /dev/media0
[2:19:17.459374439] [1748] INFO Camera camera.cpp:1029 configuring streams: (0) 9152x6944-YUV420
[2:19:17.459843158] [1750] INFO RPI raspberrypi.cpp:764 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected sensor format: 9152x6944-SBGGR10_1X10 - Selected unicam format: 9152x6944-pBAA
[2:19:17.649313259] [1750] ERROR V4L2 v4l2_videodevice.cpp:1218 /dev/video14[16:cap]: Not enough buffers provided by V4L2VideoDevice
ERROR: *** failed to allocate capture buffers ***
[email protected]:~/pics $

hi, @bmike

You can refer to the following links to solve the problem of “failed to allocate capture buffers”.


Yes I have followed the instructions. I’ve done the install several times to check.

All other features I’ve tested work.

Could you just confirm if the command given works for you on Pi 4 4GB Pi with latest OS. If so, at least I know it’s my config.

libcamera-vid -t 500 --width 9152 --height 6944 --codec mjpeg -o test%05d.jpeg --segment 1

Didn’t supply this last time:

[email protected]:~/pics $ uname -a
Linux raspberrypi4n 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux
cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 11 (bullseye)”
NAME=“Raspbian GNU/Linux”
VERSION=“11 (bullseye)”
[email protected]:~/pics $

tail of config.txt


Enable host mode on the 2711 built-in XHCI USB controller.

This line should be removed if the legacy DWC2 controller is required

(e.g. for USB device mode) or if USB support is not required.




And this

[email protected]:~/pics $ cat /proc/meminfo
MemTotal: 3930664 kB
MemFree: 3287028 kB
MemAvailable: 3586180 kB
Buffers: 31084 kB
Cached: 409680 kB
SwapCached: 0 kB
Active: 93756 kB
Inactive: 422924 kB
Active(anon): 1004 kB
Inactive(anon): 111004 kB
Active(file): 92752 kB
Inactive(file): 311920 kB
Unevictable: 31212 kB
Mlocked: 16 kB
HighTotal: 3264512 kB
HighFree: 2732128 kB
LowTotal: 666152 kB
LowFree: 554900 kB
SwapTotal: 102396 kB
SwapFree: 102396 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 107168 kB
Mapped: 129828 kB
Shmem: 36092 kB
KReclaimable: 27308 kB
Slab: 47160 kB
SReclaimable: 27308 kB
SUnreclaim: 19852 kB
KernelStack: 1904 kB
PageTables: 4580 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2067728 kB
Committed_AS: 1015640 kB
VmallocTotal: 245760 kB
VmallocUsed: 5968 kB
VmallocChunk: 0 kB
Percpu: 448 kB
CmaTotal: 524288 kB
CmaFree: 495716 kB
[email protected]:~/pics $

hi, @bmike

At present, we have not seen any problems. There is no problem with the test on the PI4 4GB.

If you have a 8GB version of PI4 in your hand, you can test it.

I don’t have an 8GB pi to hand and can’t get one due to chip shortages. Also I need to know it will work and if you say it works on an 4GB I need to know what I’m doing wrong. I followed the instructions using a brand new image.

hi, @bmike

Can you send me all the commands you executed?

libcamera-vid -t 500 --width 9152 --height 6944 --codec mjpeg -o test%05d.jpeg --segment 1

Just this one

If you meant what command did I use to install the drivers etc then I followed the instructions in arducam_64mp_pi_camera_manual.pdf

  1. wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
  2. chmod +x install_pivariety_pkgs.sh
  3. ./install_pivariety_pkgs.sh -p libcamera_dev
  4. ./install_pivariety_pkgs.sh -p libcamera_apps
  5. ./install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver

Amended /boot/config.txt as given.

I’m sure its simply running out of memory. How many buffers does it use in this mode?

hi, @bmike

Sorry, I don’t know why you keep getting this error.

We tested it several times on the 4GB version of the pi4 and it worked fine every time.

Does your system have other processes consuming resources. I suggest you try again with a re-flashed Raspberry Pi image.

I had a similar issue and what fixed it for me was, in /boot/config.txt

Instead of writing dtoverlay=vc4-kms-v3d,cma-512 underneath [all], I put it underneath [pi4]

So it becomes: