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=10.20.55.66 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):
https://drive.google.com/open?id=185ahiSzdvNQYSrrrRqFsxSbzAm8t4P7I
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?
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"
receive:
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:
https://drive.google.com/open?id=1ipBnuPrHBlpxyt8khHzOcqIpDmiFOeJ5
example of video which was saved in file:
https://drive.google.com/file/d/1993ESrbEL1ILZ1xRRxGgDjnlXcfkVX6z/view?usp=sharing
Thank you, i’ll try. But can you tell me one more thing. How can i monitor current bitrate during stream?
Hi,
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);