Skip to content

Troubleshooting on Linux with V4L

Troubleshooting installation issues

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 file can be found, e.g. export GST_PLUGIN_PATH=/path/to/some/folder.

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 variable to point to the folder in which the libplumerai_gstreamer_plugin.so file can be found, e.g. export LD_LIBRARY_PATH=/path/to/some/folder.

If the demo does not start on your 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 our ARM binaries are made for a 64-bits ARM system (aarch64). This can be verified by running uname -a and searching for armv7l or aarch64. We do provide our library itself for 32-bits ARM systems, but not the demo application.

Troubleshooting GStreamer issues

If the demo does not work you should first verify whether your camera and GStreamer are set-up correctly before contacting Plumerai. For example, if the demo printed a message starting with [Plumerai] GStreamer error:, this is most likely a GStreamer issue, and you can most likely get a more detailed error message by running the following standard GStreamer command from a terminal.

First, make sure your camera device and input resolution is right. Use the following command to list available video devices and their supported resolutions:

gst-device-monitor-1.0 Video

Next, try a few GStreamer pipelines from the command-line that mimic parts of the Plumerai GStreamer demo app, but with standard GStreamer tools. If an issue shows up during one of these pipelines, then it might be worthwhile searching the GStreamer documentation or the internet in general for solutions. Additional debug output can be obtained by adding the -v -m flags to the gst-launch-1.0 commands from below.

The simplest test is to just open the camera as input and direct it to screen output, e.g. run:

gst-launch-1.0 v4l2src device=<YOUR_CAMERA> ! glimagesink
Here, <YOUR_CAMERA> needs to be changed to e.g. /dev/video0 for the first camera.

If this works, you can specify the M-JPEG input with the resolution of choice. E.g. for /dev/video0 with 1280 x 720:

gst-launch-1.0 v4l2src device=/dev/video0 ! "image/jpeg,width=1280,height=720" ! jpegparse ! jpegdec ! videoconvert ! capsfilter caps="video/x-raw, format=RGB" ! glimagesink sync=false

If that also works, you can try a more complicated pipeline, which mimics the Plumerai demo application (in terms of GStreamer components) as close as possible:

gst-launch-1.0 v4l2src device=/dev/video0 do-timestamp=true ! "image/jpeg,width=1280,height=720,framerate=30/1" ! jpegparse ! jpegdec ! videoconvert ! capsfilter caps="video/x-raw, format=RGB" ! videoflip method=horizontal-flip ! textoverlay text="test" ! glimagesink sync=false

Alternatively, if you experience issues with file-based input or file-based output, you can try the following pipeline:

gst-launch-1.0 filesrc location=/path/to/some/video.mp4 ! decodebin ! videoconvert ! x264enc ! matroskamux ! filesink location=output.mkv

Or, if you experience issues with RTSP-stream input, you can try the following pipeline:

gst-launch-1.0 uridecodebin uri=rtsp://some_stream.mp4 ! videoconvert ! capsfilter caps="video/x-raw, format=RGB" ! textoverlay text="test" ! glimagesink sync=false

Troubleshooting the Plumerai demo application

If all of the above works from the command-line, but the Plumerai People Detection demo does not, then the first step is to ask GStreamer to print more debug-output. This is done by running export GST_DEBUG=3 in the terminal before running the demo. Below are potential error messages that could show up:

  1. 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.

  2. 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.

  3. 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. Note that the demo application uses GLX (OpenGL + X11) for displaying the results to screen.