iizukanao / picam

Audio/video recorder for Raspberry Pi with language agnostic API
GNU Lesser General Public License v2.1
489 stars 78 forks source link

Error running Picam: error while loading shared libraries #214

Closed CMDS-DIRK closed 1 month ago

CMDS-DIRK commented 2 months ago

Hi, trying out your project to set up a baby monitor but I ran into shared library issues.

I use the official camera module v2.

I have a pi 3b+ and flashed it with different raspbian OS's (bookwork, bullseye, buster) and also tried different versions of the project, but I keep running into this error:

This error is visible when running Picam 2.0.12 on raspbian bookworm 64bit (flashed with RPI Imager tool)

./picam: error while loading shared libraries: libcamera.so.0.2: cannot open shared object file: No such file or directory

If I try different versions of Picam, it gives me the same error but for different libcamera versions.

with 2.0.11 its:

 ./picam: error while loading shared libraries: libcamera.so.0.0.3: cannot open shared object file: No such file or directory

On different raspbian versions I see that different versions of libcamera are installed but they never match.

If I try to create a softlink to the existing version I get an icon error so that also doesnt seem to work.

Should I try to build some specific version of libcamera that matches with the error? I just try it with fresh installs of the OS and picam without additional libraries, other than the ones mentioned in your guide.

If I try the rpicam-vid commands I do get a camera feed running.

I have now bought a PI 5 because my PI 3 gave up on me yesterday.

Please advice.

iizukanao commented 2 months ago

@CMDS-DIRK Hi, thank you for pointing that out!

I've updated the binary to address the library compatibility problems you've mentioned. Please download the updated binary from the following link: https://github.com/iizukanao/picam/releases/tag/v2.0.12

Please note that Raspberry Pi 5 does not have an H.264 hardware encoder, so picam does not currently support Raspberry Pi 5. If you wish to record video and audio simultaneously, you might be able to achieve similar results using only ffmpeg.

CMDS-DIRK commented 2 months ago

Thanks for addressing. Can't test it at the moment, don't have an older Pi lying around will buy it later. If someone else encountered this, let me know via a comment and I'll close this one.

Will look into ffmpeg, have been able to get streams running with WebRTC and MediaMTX, see last item here

And also via the python module picamera2

But those don't include sound.

ArturGasparyan commented 1 month ago

Hello Mr. Iizuka, thank you for your nice project!

Unfortunately I have the next error of the same kind with Version 2.0.12. I'm using a Raspberry Pi Zero (armv6l but I'm using your armv7l version, because no alternative) on Rasbian Bullseye without Camera Legacy Support.

My error on run is

./picam: error while loading shared libraries: libcamera.so.0.3: cannot open shared object file: No such file or directory

(It's 0.3 not 0.0.3!)

On my Rasbian I find libcamera.so.0.0.5

So what I'm trying for the last couple of hours(!) is to find a way to install libcamera.so.0.3.0 via libcamera.org...

Maybe it would be easier to support the default for bullseye?

Also: on your readme-text there's still a section for bullseye with a special URL (-bullseye) and also respecting the "uname -m" parameter - it fails, because there is not URL found (404) with -bullseye or armv6l.

Thank you!

ArturGasparyan commented 1 month ago

Nevermind, I started afresh with buster and it works.

iizukanao commented 1 month ago

@ArturGasparyan Sorry for the confusion. The README has been corrected.