-1

I'm trying to stream a video encoded in H264 over RTP/UDP.

Sending:

gst-launch-1.0 \
  videotestsrc ! \
  video/x-raw,format=RGBx,width=960,height=540,framerate=25/1 ! \
  videoconvert ! \
  x264enc bitrate=2000 ! \
  rtph264pay config-interval=1 pt=96 ! \
  udpsink port=5000

Receive:

gst-launch-1.0 \
  udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! \
  rtph264depay ! \
  decodebin ! \
  videoconvert ! \
  ximagesink

If I start receiving the video before sending it, then everything works as intended.

However, if I start receiving video after the start of sending, then the image "breaks".

An example of a corrupted image

How to fix this problem?

Dmitrii
  • 1
  • 1
  • This looks like a user-needs-help question instead of a programming question. – Jeff Holt May 04 '22 at 13:16
  • @Jeff, I showed how you can reproduce the problem using gst-launch-1.0. It makes no sense to give the code, since it creates the same pipelin – Dmitrii May 04 '22 at 15:24
  • If it makes no sense to show the code, and I agree that showing the code is probably not useful, then this question does *not* belong here. It probably belongs at the superuser site. This site is *strictly* for specific programming problems, not user-has-a-problem-with-someone-else's-program-system problems. – Jeff Holt May 04 '22 at 18:16

1 Answers1

0

The problem was solved by specifying caps after videoconvert

...
videoconvert ! video/x-raw,format=I420
...
Dmitrii
  • 1
  • 1