Test a display with videotestsrc ! autovideosink
Check that GStreamer can open a window with gst-launch-1.0 videotestsrc ! autovideosink, using num-buffers so the test ends on its own, on GStreamer 1.26.
Before debugging a real pipeline, check that GStreamer can draw anything at all. videotestsrc generates colour bars, and autovideosink picks whatever video sink the system has.
gst-launch-1.0 videotestsrc num-buffers=150 ! autovideosinkSetting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:05.000000000
Setting pipeline to NULL ...
Freeing pipeline ...Without num-buffers the pipeline runs until you press Ctrl-C. With 150 buffers at the default 30 frames per second it ends after five seconds, which makes the command usable in a script. The elapsed time printed on your machine will differ by a few microseconds.
The first four lines show the state changes. A pipeline goes to PAUSED to preroll, which means the sink has received its first buffer, and only then to PLAYING. If a window does not appear, look at where it stopped. A hang at PAUSED usually means a sink or a link problem, and a missing window with no error often means the sink chosen by autovideosink cannot reach a display. Name one explicitly with ximagesink, waylandsink or glimagesink to find out. The element is described in the videotestsrc page.