'How to send/receive videotestsrc images encoded as JPEG using RTP with GStreamer?

I want to send/receive videotestsrc images encoded as JPEG using RTP with GStreamer.
I tried the following commands. It can be sent and received test image.
But, received image is not correct. It is broken. It seems image is dark and misaligned.
How to send and receive images normally?

  • send command
gst-launch-1.0 videotestsrc ! videoconvert ! video/x-raw, format=YUY2 ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000
  • receive command
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, media=video, encoding-name=JPEG, framerate=30/1, payload=26, clock-rate=90000 ! rtpjpegdepay ! jpegdec ! videoconvert ! autovideosink

result

enter image description here

environment

  • windows 10
  • gstreamer 1.18.3


Solution 1:[1]

@ken This works great under linux (ubuntu 20.04). I suppose there's something about Windows and/or direct 3d. It looks like this

enter image description here

so seems good.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bartek Zdanowski