Troubleshooting on Linux with V4L¶
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 exits with Creation of elements failed for {first,second} pipeline
or Creation of {first,second} pipeline failed
, 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:
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:
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
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:
-
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. -
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 viagst-device-monitor-1.0 Video
and adjust thevideo_width
,video_height
, andinput_framerate
(defaulted to 30 fps) parameters accordingly. -
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 theglxinfo
utility. Note that the demo application uses GLX (OpenGL + X11) for displaying the results to screen.