pigallery2 icon indicating copy to clipboard operation
pigallery2 copied to clipboard

[Question] PiGallery on Raspberry PI OS 64bit issues

Open gioagu opened this issue 2 years ago • 7 comments

Not sure if it's a bug, but maybe somebody has already some experience about it. And, maybe, it's related to #467.

I download v. 1.9.3 on Kubuntu 22.04 with NodeJS 14, create a release version there, test it and it works. All fine. I copy it on a Raspberry 4 with the newly released Raspberry Pi OS 64 bit (with NodeJS 14, too). I get a "Video support error", in that ffmpeg-probe can't find the executable. As a matter of fact, it requires the arm64 version, which is not available. Other than this issue, I have been using Pigallery without problems on older Raspberry OS version (32 bit however)!

Any idea how to solve it? Any workarounds? Thanks to anybody who may have suggestions! :-)

gioagu avatar Jul 25 '22 16:07 gioagu

afaik need to npm install again, as it will fetch binary for arm64, or try install ffmpeg and ffprobe from repo

martadinata666 avatar Jul 25 '22 17:07 martadinata666

Thanks for the reply.

Yes, of course I did npm install again, but no binaries for arm64 were fetched. this seems to be the problem from what I can understand.

gioagu avatar Jul 26 '22 15:07 gioagu

Just built latest code directly on rpi4 raspberry pi os 64bit which has ffmpeg and ffprobe installed via apt before hand and got the same error. Not tried building with the exclude optional flags yet because the build on pi took long enough but I suspect it would work because 1.9.3 doesn’t have these via npm.

HuwSy avatar Aug 17 '22 14:08 HuwSy

In the meanwhile, I found this simple workaround: on the Raspberry (64bit) machine, after npm install, simply delete/comment out folder ffmpeg-static in the node_modules folder. If ffmpeg is already installed (apt-get ...), nothing else is needed.

Other than this little installation glitch, version 1.9.3 rocks!! ;-)

Little edit: strictly speaking, the default ffmpeg version is lower than the required one. But since I do not transcode my videos, all is fine so far.

gioagu avatar Aug 19 '22 06:08 gioagu

If I remember correctly fluent-ffmpeg should try getting ffmpeg/probe from the environment or -if available- from npm. I also do not install ffmpeg static on docker.

relevant code is here: https://github.com/bpatrik/pigallery2/blob/master/src/backend/model/FFmpegFactory.ts

bpatrik avatar Aug 20 '22 20:08 bpatrik

Probably just me not knowing how this works. But that code looks for ffmpeg-static not ffmpeg, does that make any difference and perhaps a difference between the 32bit and 64bit os as the latter is more Debian that Raspberry Pi OS now?

HuwSy avatar Aug 21 '22 07:08 HuwSy

fluent ffmpeg uses ffmpeg from environment and the code then tries to overwride it with ffmpeg-static (since if you installed the static npm package, you probably want to use that one, not the system ffmpeg)

bpatrik avatar Aug 30 '22 07:08 bpatrik