"I cannot display the video stream I created with Gstreamer on the screen using OpenCV

iirc, opencv’s gui funcs (waitKey(), imshow(), namedWindow(), etc) must stay on the main thread
also, you’d want waitKey(sleep_some_millis); , without args it assumes 0 and sleeps fprever