node-ffmpeg-installer
node-ffmpeg-installer copied to clipboard
Add support for raspberry / raspbian buster
On rasperrypi 4 I get "segmentation fault" trying to use ffmpeg installed with the installer. I also tried to call it directly in node_modules/@ffmpeg-installer/linux-arm/ffmpeg and it gives me directly the message "segmentation fault", so it seems to be the wrong binary for this architecture.
The binarys from https://www.johnvansickle.com/ffmpeg/ don't run on raspberry. It would be great to add Support for Raspberry by using the right binarys. The right binarys can be found here: https://github.com/bushev/rpi-ffmpeg Or extracted from http://raspbian.raspberrypi.org/raspbian/pool/main/f/ffmpeg/ffmpeg_4.1.4-1~deb10u1_armhf.deb in folder usr/bin/ffmpeg
Difficulty is to detect when to use those, as os.platform() = linux and os.arch() = arm, so I don't know how to identify if those binarys should be used. Any idea? I would make a pull request if I would know how to savely detect that.
Sad to say, I have absolutely no idea if it can be detected, doesn't seem line it from the docs, if it's linux and arm, how can you tell the difference? Unless the other binaries you speak of work on other arms and I just have a bad version (it was a pull request, didn't add that myself). I have no arm devices at all myself, so can't check either way. But look in closed issues for ARM.
Another possible way to go forward for you, not a very fun one possibly, would be to fork this project and replace the parts you need, possibly making it a ffmpeg-for-raspberry only or something. The main code seems to be stable and not really changing, so it's mostly about supporting architectures and updating versions anyway.
I'll help if I can.
Problem is I would have to fork about 3 projects to get that to the one I wanted. I don't have another arm device than a couple of raspberrys, so I won't be able to test the binarys which are working on raspberry on other arm devices. But for my project @Jey-Cee pointed me to his implementation which can be found here: https://github.com/Jey-Cee/iobroker.onvif/blob/c8c75b12feca571f372f8fa0fb76fffa96233c5a/main.js#L1133
He is also using the binarys from johnvansickle, I tried them and it worked. I will make a pull request to update the library, I don't know the exact difference as they are binary but as they should be from the same source it might just be newer and it should also work for other arms.