Absolute beginner questions about simple errors with gleffects_sepia/gleffects_xray and facedetect

Hi!

I’ve just (as in, just now) started using gstreamer, having followed along with the “The GStreamer Multimedia Framework” video. Mostly its going fine and gstreamer is very cool, but I had a couple of questions.

First, when using one of the commands from the video I got an error that I don’t understand. At 21.11 theres an example pipeline:

gst-launch-1.0 v4l2src ! video/x-raw,width=320,height=240 ! videoconvert ! tee name=t1 t1. ! queue ! ximagesink t1. ! queue ! videoconvert ! edgedetect ! videoconvert ! ximagesink t1. ! queue ! videoconvert ! motioncells ! videoconvert ! ximagesink t1. ! queue ! videoconvert ! glupload ! gleffects_sepia ! glimagesink t1. ! queue ! videoconvert ! glupload ! gleffects_xray ! glimagesink

The relevant part of the response (I think) is:

WARNING: from element /GstPipeline:pipeline0/GstGLUploadElement:gluploadelement2: not negotiated
Additional debug info:
gstbasetransform.c(1423): gst_base_transform_reconfigure (): /GstPipeline:pipeline0/GstGLUploadElement:gluploadelement2:
not negotiated
WARNING: from element /GstPipeline:pipeline0/GstGLUploadElement:gluploadelement0: not negotiated
Additional debug info:
gstbasetransform.c(1423): gst_base_transform_reconfigure (): /GstPipeline:pipeline0/GstGLUploadElement:gluploadelement0:
not negotiated
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.429361820
Setting pipeline to NULL ...
Freeing pipeline ...

If i remove the two last sections before the t1 (so, using the basic video stream, the edge detect, and motioncell elements) it works fine and i get three windows displaying the expected versions of the camera feed. If I add either or both of the subsequent sections (gleffects_sepia or gleffects_xray) I get these errors. So my first question is, are there any suggestions what I’m doing wrong or need to add to get these elements working?

Similarly, I attempted to use the example pipeline from the facedetect plugin page:

gst-launch-1.0 autovideosrc ! decodebin ! colorspace ! facedetect ! videoconvert ! xvimagesink

and this says colorspace isn’t an element. I also can’t find where to get the colorspace element, and if i replace decodebin ! colorspace with videoconvert it displays the webcam stream, but I cannot get it to display the facedetect elements that I expect (boxes around eyes, face, etc - I assume thats what facedetect is meant to do?). I have checked the default path it uses to find the relevant haarcascade .xml files and added them in and I still can’t get it to work. I think the facedetect plugin is part of the “bad” plugins so not expected to work, but any advice on what I’m doing wrong or where to look for solutions would be appreciated!

Many thanks for any help!

Hi, could you test this version of the gleffects pipeline and see if it works?:

gst-launch-1.0 v4l2src ! video/x-raw,width=320,height=240 ! videoconvert ! \
tee name=t1 \
t1. ! queue ! ximagesink \
t1. ! queue ! videoconvert ! glupload ! gleffects_sepia ! glimagesink \
t1. ! queue ! videoconvert ! glupload ! gleffects_xray ! glimagesink

The issue you had points to the caps negotiation not happening or failing. This means that glupload received a type of data it can’t handle.

I have no real answer where to get the colorspace plugin. This might be among plugins-good/bad/ugly packages but I have not had luck searching for it. I’m guessing the plugin might have applied some color change to make the bounding boxes of facedetect more visible (?).