On Ubuntu 22.04, Gstreamer does not work with parameters that is is quotation marks. This happens to the basic-tutorial-1.c where
pipeline = gst_parse_launch ("playbin uri=https://gstreamer.freedesktop.org/data/media/sintel_trailer-480p.webm", NULL);
does not work. What is the problem?
I cloned the GStreamer tutorial from https://gitlab.freedesktop.org/gstreamer/gstreamer and compiled the basic-tutorial-1.c ok. When I run it, it outputs the following errors: (base):~/gstreamer/subprojects/gst-docs/examples/tutorials$ ./basic-tutorial-1
(basic-tutorial-1:315315): GStreamer-CRITICAL **: 14:27:52.732: gst_caps_from_string: assertion 'string' failed
(basic-tutorial-1:315315): GStreamer-CRITICAL **: 14:27:52.732: gst_pad_template_new: assertion 'caps != NULL' failed
(basic-tutorial-1:315315): GStreamer-CRITICAL **: 14:27:52.732: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(basic-tutorial-1:315315): GStreamer-CRITICAL **: 14:27:52.732: gst_element_class_add_pad_template: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed
(basic-tutorial-1:315315): GStreamer-Video-CRITICAL **: 14:27:52.732: gst_video_decoder_init: assertion 'pad_template != NULL' failed
(basic-tutorial-1:315315): GStreamer-WARNING **: 14:27:52.732: Element vaapidecode0 has an ALWAYS template src, but no pad of the same name Segmentation fault (core dumped)
In contrast, the following command worked fine (without quotation marks): $gst-launch-1.0 -v videotestsrc ! videoconvert ! video/x-raw, width=640, height= 480 ! videoconvert ! autovideosink
but the one with the quotation mark did not and shows this error: $gst-launch-1.0 -v videotestsrc ! videoconvert ! 'video/x-raw, width=640, height= 480' ! videoconvert ! autovideosink WARNING: erroneous pipeline: could not parse caps "video/x-raw,\ width=640,\ height=\ 480"
Tried the solution in this post to remove the vaapi package and its configuration:
$sudo apt purge gstreamer1.0-vaapi
Worked!