h265 video encoder fragments video

I’m trying to encode and decode video with h265 using next code:

"appsrc ! videoconvert ! video/x-raw,format=I420,width=1920,height=1080,framerate=60/1
 !  omxh265enc bitrate=10000000 iframeinterval=30 ! rtph265pay ! udpsink host= port=4510"
"udpsrc port=4510 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay 
! h265parse ! queue ! omxh265dec ! videoconvert ! appsink"

But video that i got in result was fragmented (watch this video):

What i’m doing wrong?

UPD : i have found, that if i save video in file:

"appsrc ! videoconvert ! video/x-raw,format=I420,width=1920,height=1080,framerate=60/1 !  "
"omxh265enc bitrate=10000000 iframeinterval=30! matroskamux "
 " ! filesink location=test.mkv"

and then open it using some video player, it has perfect quality.
Does it mean that decoder works incorrectly or that i lose some information during send by network?
Anyway, is there any solution for this trouble?

RTSP shall be more reliable since it is based on TCP/IP. You may refer to

hi. thanks for your answer. video quality became much better after, there is no more move defects, but now video has very high noise (in comparison with video saved in file without send by network). is there any way to remove it? probably i missed any option in codec?
now i send video using:

appsrc name=vsrc ! videoconvert ! video/x-raw,format=I420,width=1920,height=1080,framerate=60/1 ! "
omxh265enc bitrate=200000000 iframeinterval=30 preset-level=3 ! rtph265pay name=pay0 pt=96"


rtspsrc location=rtsp://%1:%2/vd latency=0 protocols=GST_RTSP_LOWER_TRANS_TCP 
! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! queue 
! omxh265dec ! videoconvert ! appsink sync = false

example of video which was sent by network:
example of video which was saved in file:

For video quality tuning, please check

Thank you, i’ll try. But can you tell me one more thing. How can i monitor current bitrate during stream?


You may add a callback to source pad of encoder to get all buffers.

gst_pad_add_probe (encoder_src_pad, GST_PAD_PROBE_TYPE_BUFFER,
    encoder_src_pad_buffer_probe_callback, NULL, NULL);