I am trying to play a simple video on a raspberri pi 4 , I tried the native processing library but it literally gives the error " this library is not built for aarch64" . and I tried the GLVideo library and got a similar error saying that libglvideo.so for the aarch64 is not available.
for both cases I used the sample code ,is there something I can do to make it work?
Unfortunately the processing-glvideo library hasn't been updated in a few years and is archived.
If you really need to use this library, the options I can think off are not super straight forward:
libraries/glvideo/library/linux-armv6hf
folder and rename it to linux-aarch64
(kept within the same library
). Based on what I read here there's a small chance it might be picked up and with a bit of luck of the 64-bit OS will load/use non 64-bit libraries as well. This isn't tested, so it might not work, but if it does it's a simpler workaround.aarch64
. This should work, but it's not something I recommend for a beginner.The steps would be:
sudo apt-get install build-essential
), ensure JDK is installed (and javac
is added to the PATH
environment variable) and install ant (sudo apt-get install ant
).cd /path/to/your/glvideo-repo-clone/src/native/ && make
) (hopefully no errors there if all the dependencies have been installed succesfully)cd /path/to/your/glvideo-repo-clone && ant
(This should pickup build.xml and build the processing java library)From a pragmatic point of view it might be simpler to switch languages to get your project over the line.
For example, you can trigger the video playback from command line (bash) as omxplayer should be preinstalled:
omxplayer /path/to/your/video.mp4
(you have additional flags available for fullscreen, looping, etc.)
Additionally, if you need more complex logic that would cumbersome as a shell script you could use a bit of python and the OMXPlayer module. The syntax is different from Java, yes, but it is, in a way, simpler/less verbose and would be faster to iterate with than using Processing on Raspberry Pi with limited resources. (On the long run being familiar with more languages also pays off).
Here is a simple example the omxplayer wrapper provides:
#!/usr/bin/env python3
from omxplayer.player import OMXPlayer
from pathlib import Path
from time import sleep
VIDEO_PATH = Path("../tests/media/test_media_1.mp4")
player = OMXPlayer(VIDEO_PATH)
sleep(5)
player.quit()