Troubleshooting issues with the demo¶
This page gives answers to potential issues you might encounter when installing and running the Plumerai People Detection demo.
Step 0: Issues with understanding your system¶
Find out which macOS system you have¶
If you do not know if you have one of the older Intel x86-64 models or one of the newer Apple Silicon Mx arm64 models, then click the Apple icon from the top-left corner of the menu bar and select the About This Mac
option. If you see Apple M1 or higher in the Chip
section, it means you have one of the newer Apple Silicon arm64 models.
Step 1: Issues with the GStreamer installation¶
General¶
If the test GStreamer command does not work, double check your installation and the error messages that show up in the terminal. If there are no error messages or the information is not sufficient, you can first run export GST_DEBUG=3
and then the test command again. This should give more information.
X Error¶
If you get an error message including X Error of failed request
, your GLX set-up might not be working. You can debug this using the glxinfo
utility on Linux. Note that the demo application uses OpenGL for displaying the results to screen.
GStreamer utilities are not available on the command-line on macOS¶
For GStreamer utilities (gst-device-monitor-1.0
and gst-launch-1.0
) to be available via the command-line on macOS you might need to prepend the GStreamer installation path to the $PATH
variable, e.g.:
Installing libcamera does not work¶
If any issues are encountered, first try to check out the latest commit instead (i.e. git checkout master
). If it turns out to be too difficult or impossible to build libcamera and its GStreamer plugin on the target system, then Plumerai can also provide a pre-built package that can be unzipped into /usr/local
as root. We provide this only on request, because this might have incompatibility issues with your system: building from source is preferred.
Could not find libcamera plugin element¶
If gst-launch
given an error such as WARNING: erroneous pipeline: no element "libcamerasrc"
and gst-inspect-1.0 libcamerasrc
returns No such element or plugin 'libcamerasrc'
, then the plugin might not be installed correctly. Make sure you follow the provided build instructions, including the install target. If it still cannot be found, you might have to set the GST_PLUGIN_PATH
, e.g. export GST_PLUGIN_PATH=/usr/local/lib/aarch64-linux-gnu/
.
Autofocus does not work with the PiCam v3¶
If autofocus does not work when using the PiCam v3, then you might be running a too old version of libcamera
. It is essential you follow the provided build instructions and use version 0.1.0 (2023-07-16) or newer.
In doubt, you can check the version of libcamera
by running:
You can test autofocus on the PiCamV3 using:
Step 2: Issues with the demo installation¶
Running xattr on macOS does not work¶
If xattr
does not work, you might have already run it, it will give an error the second time. Alternatively, you can follow these steps:
- Locate the demo folder for your system in
Finder
. - For each file in
libplumerai_gstreamer_plugin.dylib
,libosxvideo.dylib
, andplumerai_demo
: - Control+Click the demo application and select
Open
. - Click
Open
.
Step 3A: Issues with camera selection¶
V4L camera support¶
On Linux, if your camera does not show up with gst-device-monitor-1.0 Video
, it might not be supported by Video4Linux / V4L, although most cameras and webcams are supported. You can verify this by querying the supported camera's from V4L itself by running v4l2-ctl --list-formats-ext
.
Step 3B: Issues with video input selection¶
Camera format¶
If your camera does not meet the Plumerai People Detection requirements for the video format (e.g. JPEG or YUY2), please contact Plumerai and include the output of gst-device-monitor-1.0 Video
in your message. There is a good chance that we can add support for your camera too.
Step 3C: Issues with running the demo¶
General¶
If the demo does not work and if there are no error messages or the information is not sufficient, you can first run export GST_DEBUG=3
in the terminal window and then run the demo again. This should give you much more debug information.
Creation failure for 'people_detection'¶
If the demo exits and prints [Plumerai] GStreamer error: Creation failure for 'people_detection'
, then it is likely that the demo executable cannot find the library plugin library file. Make sure both files are in the same directory and that you run the executable from that directory (i.e. ./plumerai_demo
and not ./path/to/plumerai_demo
). Alternatively, you can try to set the GST_PLUGIN_PATH
variable to point to the folder in which the libplumerai_gstreamer_plugin.{so,dylib}
file can be found, e.g. export GST_PLUGIN_PATH=/path/to/some/folder
.
Error while loading shared libraries¶
If the demo does not start and prints error while loading shared libraries: libplumerai_gstreamer_plugin.so: cannot open shared object file: No such file or directory
, then the demo executable cannot find the library plugin library file. Make sure both files are in the same directory. Alternatively, you can set the LD_LIBRARY_PATH
(Linux) or DYLD_LIBRARY_PATH
(macOS) variable to point to the folder in which the libplumerai_gstreamer_plugin.{so,dylib}
file can be found, e.g. export LD_LIBRARY_PATH=/path/to/some/folder
.
Syntax error: unterminated quoted string¶
If the demo does not start on your Linux Arm system and prints something along the lines of ./plumerai_demo: line 4: syntax error: unterminated quoted string
, then you might be running on a 32-bits Arm system (armv7l
), while you are trying to run an Arm binary made for a 64-bits Arm system (aarch64
) or vice-versa. Whether your Arm system is 32-bit or 64-bit can be verified by running getconf LONG_BIT
in Linux, which should print either 32
or 64
. Alternatively, you can use uname -a
and search for armv7l
or aarch64
to find out if your Linux kernel is 32-bit or 64-bit. However, note that on recent versions of RaspberryPiOS, you might be running a 64-bit kernel with a 32-bit userland, so it is advised to use getconf LONG_BIT
instead.
We do provide both our library and the demo for 32-bit (armv7l
) and 64-bits (aarch64
) Arm systems, so please use the appropriate executable.
Library not loaded: '@rpath/libplumerai_gstreamer_plugin.dylib¶
If the demo does not start and prints Library not loaded: '@rpath/libplumerai_gstreamer_plugin.dylib'
, then the demo executable cannot find the library plugin library file. Make sure both files are in the same directory. Alternatively, you can set the DYLD_LIBRARY_PATH
variable to point to the folder in which the libplumerai_gstreamer_plugin.dylib
file can be found, e.g. export DYLD_LIBRARY_PATH=/path/to/some/folder
.
Library not loaded: '@rpath/libgstreamer-1.0.0.dylib¶
If the demo does not start and prints Library not loaded: '@rpath/libgstreamer-1.0.0.dylib'
or Library not loaded: '@rpath/libgstvideo-1.0.0.dylib'
, then the demo executable cannot find the GStreamer library file. Make sure you have installed GStreamer as described here. If the error persists, you can set the DYLD_LIBRARY_PATH
variable to point to the folder in which the libgstreamer-1.0.0.dylib
file can be found, e.g. export DYLD_LIBRARY_PATH=/path/to/some/folder
.
Erroneous pipeline: no element¶
If you get an error message along the lines of erroneous pipeline: no element <x>
then it might be that some additional packages need to be installed. Please refer to the official GStreamer documentation for installation instructions. Alternatively, on macOS, if you have the packages installed already, it might mean that you'll have to specify GST_PLUGIN_SYSTEM_PATH
manually such that GStreamer can find them. This path is dependent on your GStreamer installation directory.
Internal data stream error¶
If you get an error message along the lines of GStreamer error received from element 'source': 'Internal data stream error.'
check the supported resolutions and frame rates of your camera via gst-device-monitor-1.0 Video
and adjust the video_width
, video_height
, and input_framerate
(defaulted to 30 fps) parameters accordingly.
Step 4: Issues with video file input¶
General issues¶
Most of the contents under step 3C are also valid in case video file input is used. So, please check those first.
Simple stand-alone GStreamer pipeline¶
If you experience issues with fille-based input, you can try the following stand-alone GStreamer pipeline:
If that works, please contact Plumerai. If that does not work, the issue lies with your GStreamer installation or your input arguments, i.e. your video file.
Step 5: Issues with RTSP stream input¶
General issues¶
Most of the contents under step 3C are also valid in case video file input is used. So, please check those first.
Simple stand-alone GStreamer pipeline¶
If you experience issues with RTSP-stream input, you can try the following stand-alone GStreamer pipeline:
gst-launch-1.0 uridecodebin uri=rtsp://some_stream_url.mp4 ! videoconvert ! capsfilter caps="video/x-raw, format=RGB" ! glimagesink
If that works, please contact Plumerai. If that does not work, the issue lies with your GStreamer installation or your input arguments, i.e. your RTSP stream URL.