AR# 71605

2018.1/2 Zynq UltraScale+ MPSoC VCU: Why do I see garbled video output when using VLC to send and receive a transport stream?

描述

Why do I see garbled video output when using VLC to send and receive a transport stream. 

This can also be seen when using two ZCU106 boards, one as the transmitter and other as a receiver.

ZCU106 Receiver with DP:

root@zcu106_vcu_trd:/media/card# gst-launch-1.0 udpsrc port=5004 buffer-size=16000000 caps="application/x-rtp" ! rtpmp2tdepay ! tsparse ! video/mpegts ! tsdemux ! queue max-size-buffers=0 max-size-time=0 ! h264parse ! omxh264dec ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
[  404.500117] PLL: shutdown
[  404.509099] PLL: enable
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:07:13.788670521
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
[  833.383909] PLL: shutdown
[  833.393016] PLL: enable
Freeing pipeline ...
root@zcu106_vcu_trd:/media/card#


ZCU106 Sender:

root@zcu106_vcu_trd:/media/card# gst-launch-1.0 -v filesrc location=test.ts ! tsdemux ! h264parse ! omxh264dec ! omxh264enc ! h264parse  ! mpegtsmux ! rtpmp2tpay ! udpsink host=192.168.1.2 port=5004 max-lateness=-1 qos-dscp=60 async=false max-bitrate=60000000 -v
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)8/9, width=(int)720, height=(int)480, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)3
Redistribute latency...
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)8/9, width=(int)720, height=(int)480, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)3
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)720, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)8/9, colorimetry=(string)sRGB, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)8/9, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30000/1001
Redistribute latency...
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)8/9, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30000/1001
!! The specified Level is too low and will be adjusted !!
!! The specified ScalingList is not allowed; it will be adjusted!!
!! CABAC encoding is not allowed in baseline profile; CAVLC will be used instead !!
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, parsed=(boolean)true
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:sink_65: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, ssrc=(uint)1162902325, timestamp-offset=(uint)1742659851, seqnum-offset=(uint)24823
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, ssrc=(uint)1162902325, timestamp-offset=(uint)1742659851, seqnum-offset=(uint)24823
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f5a3175c0 >
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, seqnum-offset=(uint)24823, timestamp-offset=(uint)1742659851, ssrc=(uint)1162902325
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, seqnum-offset=(uint)24823, timestamp-offset=(uint)1742659851, ssrc=(uint)1162902325
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f5a3175c0 >
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0: timestamp = 1742659851
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0: seqnum = 24823
Got EOS from element "pipeline0".
Execution ended after 0:05:41.874995976
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@zcu106_vcu_trd:/media/card#

解决方案

This will happen if the user does not specify the target bitrate.

In the above example, VLC reported the bitrate of the output as being around 100, which results in poor video quality.

The user should specify the omxh264enc or omxh265enc plugin target-bitrate (i.e. 5000, 8000 etc.) when creating their GStreamer Pipelines.


The below GStreamer pipeline shows how to set the target-bitrate.

Note: More information on the plugin options can be found in the LogiCORE H.264/H.265 Video Codec Unit (VCU) (PG252).

ZCU106 Receiver with DP:

root@zcu106_vcu_trd:/media/card# gst-launch-1.0 udpsrc port=5004 buffer-size=16000000 caps="application/x-rtp" ! rtpmp2tdepay ! tsparse ! video/mpegts ! tsdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! h264parse ! omxh264dec ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
[  844.674934] PLL: shutdown
[  844.683939] PLL: enable
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:05:57.295060142
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
[ 1193.142103] PLL: shutdown
[ 1193.151277] PLL: enable
Freeing pipeline ...
root@zcu106_vcu_trd:/media/card#


ZCU106 Sender:

root@zcu106_vcu_trd:/media/card# gst-launch-1.0 -v filesrc location=test.ts ! tsdemux !  h264parse ! omxh264dec ! omxh264enc target-bitrate=5000 control-rate=low-latency ! h264parse  ! mpegtsmux ! rtpmp2tpay ! udpsink host=192.168.1.2 port=5004 max-lateness=-1 qos-dscp=60 async=false max-bitrate=60000000 -v
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)8/9, width=(int)720, height=(int)480, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)3
Redistribute latency...
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)8/9, width=(int)720, height=(int)480, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)3
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)720, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)8/9, colorimetry=(string)sRGB, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)8/9, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30000/1001
Redistribute latency...
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)8/9, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30000/1001
!! The specified Level is too low and will be adjusted !!
!! The specified ScalingList is not allowed; it will be adjusted!!
!! CABAC encoding is not allowed in baseline profile; CAVLC will be used instead !!
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, parsed=(boolean)true
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:sink_65: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, width=(int)720, height=(int)480, pixel-aspect-ratio=(fraction)8/9, framerate=(fraction)30000/1001, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, ssrc=(uint)1467357970, timestamp-offset=(uint)3690967205, seqnum-offset=(uint)12594
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, ssrc=(uint)1467357970, timestamp-offset=(uint)3690967205, seqnum-offset=(uint)12594
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f5a3175c0 >
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, seqnum-offset=(uint)12594, timestamp-offset=(uint)3690967205, ssrc=(uint)1467357970
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33, seqnum-offset=(uint)12594, timestamp-offset=(uint)3690967205, ssrc=(uint)1467357970
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0280001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f5a3175c0 >
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0: timestamp = 3690967205
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0: seqnum = 12594
Got EOS from element "pipeline0".
Execution ended after 0:05:42.044125589
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@zcu106_vcu_trd:/media/card#

链接问答记录

主要问答记录

AR# 71605
日期 10/17/2018
状态 Active
Type 综合文章
器件
Tools
IP
Boards & Kits