UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
434 Views
Registered: ‎10-18-2018

ZCU106 vcu encode and decode latency

Jump to solution

I use NTT equipment for H265 encoding, through the UDP network port package output, H265 stream decoding in ZCU106, output to the monitor for display, test the entire encoding and decoding process delay nearly 3 seconds, why the delay is so large?
But VCU encode and decode latency is 150ms in pg252, why?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor bilal5330
Visitor
207 Views
Registered: ‎10-01-2019

Re: ZCU106 vcu encode and decode latency

Jump to solution

Hi,
I experienced the same issue, however I solved it by carefully checking and reconstructing the gstreamer pipeline.
The following pipeline will show you glass-to-glass latency on ZCU106 board.

----------------------------------------------------------------------------------------------
>> Single ZCU106 board (Its really fast, you will not feel any latency as such.)

Cature->Encode->Decode Display

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1280, height=720, format=NV12, framerate=60/1 ! \
omxh265enc initial-delay=0 qp-mode=auto gop-mode=basic gop-length=3 b-frames=0 target-bitrate=4000 num-slices=8 control-rate=disable prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 periodicity-idr=60 ! \
omxh265dec ! videoconvert ! kmssink bus-id="a0070000.v_mix" sync=false async=false --verbose

----------------------------------------------------------------------------------------------
>> Between two boards:

Board-1, HDMI Capture, Compression, RTP Send.
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1280, height=720, format=NV12, framerate=60/1 ! \
omxh265enc initial-delay=0 qp-mode=auto gop-mode=basic gop-length=3 b-frames=0 target-bitrate=4000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 periodicity-idr=60 ! \
video/x-h265, alignment=nal ! queue ! mpegtsmux alignment=7 name=mux ! rtpmp2tpay ! \
udpsink host=192.168.0.9 port=5004 sync=false async=false --verbose

Board-2, RTP Receive, Decode, Display HDMI
gst-launch-1.0 udpsrc port=5004 buffer-size=60000000 caps="application/x-rtp, clock-rate=90000" ! rtpjitterbuffer ! rtpmp2tdepay ! tsparse ! video/mpegts ! tsdemux name=demux ! h265parse ! video/x-h265, alignment=nal ! omxh265dec low-latency=true ! videoconvert ! kmssink bus-id="a0070000.v_mix" sync=false async=false --verbose

I observed latency around 200~300msec in this case.
It was 720p @ 60fps camera video.

~Bilal

Img00009.png
4 Replies
Explorer
Explorer
363 Views
Registered: ‎10-03-2018

Re: ZCU106 vcu encode and decode latency

Jump to solution

Good day @shengdishd ,

Here are my two-bits for what it is worth:

I use NTT equipment for H265 encoding, through the UDP network port package output, H265 stream decoding in ZCU106, output to the monitor for display, test the entire encoding and decoding process delay nearly 3 seconds, why the delay is so large?

  • Where is that time spent? 
  • I assume that your encode and transfer system has a delay - do you know how long that might be? 
  • Check the network delay for single UDP packets. 
  • There will be a delay as the UDP packets are processed and bundled for transmission. 
  • There is a similar delay as UDP packets are received and broken into a byte stream suitable for decode. 
  • How is your video encoded?  Note that anything outside of eight-bit encoded video has a huge overhead transforming from YUV to one of the RGB formats. 
  • Network streaming tends to want consistent data rates - try setting up CBR [Constant Bit Rate] from your encoder. 
  • Try disabling the Nagle (spelling?) algorithm for your transmit port. 

But VCU encode and decode latency is 150ms in pg252, why?

  • If you are encoding at a rate of 30 frame/sec, that is a five-frame delay, which would be necessary for the motion detection in HEVC, would it not?
  • As for decode latency, I am uncertain - I would expect something like three frame times, given all the necessary data transfer. 

 

Kind Regards,
Peimann, S. M.
----
Toddlers are the Storm-Troopers of the Great God Entropy.
Physics: Not Just a Good Idea, It's THE LAW.
Moderator
Moderator
323 Views
Registered: ‎11-09-2015

Re: ZCU106 vcu encode and decode latency

Jump to solution

Hi @shengdishd 

Do you have any update on this topic? Was @peimann 's reply helpful?

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply)

If this is not solved/answered, please reply in the topic giving more information on your current status.

Thanks and Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Visitor bilal5330
Visitor
208 Views
Registered: ‎10-01-2019

Re: ZCU106 vcu encode and decode latency

Jump to solution

Hi,
I experienced the same issue, however I solved it by carefully checking and reconstructing the gstreamer pipeline.
The following pipeline will show you glass-to-glass latency on ZCU106 board.

----------------------------------------------------------------------------------------------
>> Single ZCU106 board (Its really fast, you will not feel any latency as such.)

Cature->Encode->Decode Display

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1280, height=720, format=NV12, framerate=60/1 ! \
omxh265enc initial-delay=0 qp-mode=auto gop-mode=basic gop-length=3 b-frames=0 target-bitrate=4000 num-slices=8 control-rate=disable prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 periodicity-idr=60 ! \
omxh265dec ! videoconvert ! kmssink bus-id="a0070000.v_mix" sync=false async=false --verbose

----------------------------------------------------------------------------------------------
>> Between two boards:

Board-1, HDMI Capture, Compression, RTP Send.
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1280, height=720, format=NV12, framerate=60/1 ! \
omxh265enc initial-delay=0 qp-mode=auto gop-mode=basic gop-length=3 b-frames=0 target-bitrate=4000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true cpb-size=1000 periodicity-idr=60 ! \
video/x-h265, alignment=nal ! queue ! mpegtsmux alignment=7 name=mux ! rtpmp2tpay ! \
udpsink host=192.168.0.9 port=5004 sync=false async=false --verbose

Board-2, RTP Receive, Decode, Display HDMI
gst-launch-1.0 udpsrc port=5004 buffer-size=60000000 caps="application/x-rtp, clock-rate=90000" ! rtpjitterbuffer ! rtpmp2tdepay ! tsparse ! video/mpegts ! tsdemux name=demux ! h265parse ! video/x-h265, alignment=nal ! omxh265dec low-latency=true ! videoconvert ! kmssink bus-id="a0070000.v_mix" sync=false async=false --verbose

I observed latency around 200~300msec in this case.
It was 720p @ 60fps camera video.

~Bilal

Img00009.png
Moderator
Moderator
173 Views
Registered: ‎11-21-2018

Re: ZCU106 vcu encode and decode latency

Jump to solution

Hi @shengdishd 

Did @bilal5330  answer solve your problem? 

If your question is answered or your issue is solved, please kindly mark the response which helped as a solution (click on "Accept as solution" button below the reply).

 

If this is not solved/answered, please reply in the topic giving more information on your current status.

 

Thanks and Regards,

 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos