Dji h20t jetpack 4.6..5 => 5.1.3

Hello. We used xavier nx with jetpack 4.6.5. DJI camera H20T sends from PSDK stream in h264 format. Stream bitrate ~15mb. There is no way to send it without compression. We found a working pipeline that worked in JP 4.6.5 ubuntu 18 xavier nx. We are forced to move to JP 5.1.3 ubuntu 20 Orin. The same pipeline stopped working. Any ideas?

pipeline

gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv ! “video/x-raw(memory:NVMM), height=1080,pixel-aspect-ratio=1/1,add-borders=true, format=NV12” ! nvv4l2h264enc MeasureEncoderLatency=1 maxperf-enable=1 control-rate=1 bitrate=3000000 peak-bitrate=3500000 ! video/x-h264 ! rtspclientsink blocksize=1180 mtu=1280 protocols=udp location=rtsp://localhost:8554/dji

Hi,
In the pipeline it does hardware decoding and then hardware encoding. We would suggest break down the pipeline to run only hardware decoding. To check if hardware decoding works. If it works, you can try to add queue plugin between decoding and encoding. Sometimes adding queue helps in certain conditions.

Thank you
How to do your suggest? I mean can you suggest how to check the decode part? Can you share the pipeline?

Hi,
You may try

$ gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! fakesink
$ gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! fakesink
$ gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv ! fakesink
$ gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv ! queue ! nvv4l2h264enc ! fakesink
gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:09.020288429
Setting pipeline to NULL ...
Freeing pipeline ...
gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! fakesink
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 
NVMMLITE_NVVIDEODEC, <NvMMLiteNvVideoDecSetAttribute:9359> Error status reporting set to 1
gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv ! fakesink
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 
NVMMLITE_NVVIDEODEC, <NvMMLiteNvVideoDecSetAttribute:9359> Error status reporting set to 1

gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv ! queue ! nvv4l2h264enc ! fakesink
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 
NVMMLITE_NVVIDEODEC, <NvMMLiteNvVideoDecSetAttribute:9359> Error status reporting set to 1

if I undestand right only first worked all others crashed on nvv4l2decoder…

I can share tcpdump of stream. I checked it can be use to simulate replay stream using udpreplay
https://github.com/rigtorp/udpreplay?tab=readme-ov-file

Hi
any ideas

I tryied to add debug
GST_DEBUG=h264parse:2 gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 update-timecode=1 disable-passthrough=1 ! fakesink
and got infinite warnings
0:00:04.959725561 5173 0xaaaaeec8f520 WARN h264parse gsth264parse.c:620:gst_h264_parse_process_sei: failed to parse one or more SEI message

but same stream works perfect JP 4.6.5
[h20t_devkit_ub18_psdk_m350_zoom.pcap - Google Drive](https://link to pcap file of stream)

Hello @markin.yuriy,

Found this post, seems similar to the problem you are seeing.

Would it be possible for you to run the following pipe?

$ gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 enable-max-performance=1 ! fakesink

Please let us know how it goes.

regards,
Andrew
Embedded Software Engineer at ProventusNova

Hi,
It looks like hardware decoder cannot recognize the stream. Please try software decoder avdec_h264 plugin and see whether the stream can be decoded.

Hi Andrew
GST_DEBUG=*:2 gst-launch-1.0 udpsrc port=5555 ! queue ! h264parse config-interval=-1 ! nvv4l2decoder enable-frame-type-reporting=1 enable-max-performance=1 ! fakesink

output

Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
0:00:00.069555465  8394 0xaaaae0e1f690 WARN                    v4l2 gstv4l2object.c:4682:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 
NVMMLITE_NVVIDEODEC, <NvMMLiteNvVideoDecSetAttribute:9371> Error status reporting set to 1
0:00:00.081397904  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.081431921  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.081445905  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.110450805  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.110474934  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.110487542  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.144042111  8394 0xaaaae0e16d80 WARN            videodecoder gstvideodecoder.c:3158:gst_video_decoder_prepare_finish_frame:<nvv4l2decoder0> decreasing timestamp (0:00:00.038572569 < 0:00:00.041013824)
0:00:00.144126017  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.144150850  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.144167810  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.176688532  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.176742486  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.176767190  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.212375789  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.212405358  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.212431726  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.244736668  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.244786269  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.244810653  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.279047158  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.279108535  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.279140920  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.310544145  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.310591858  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.310612243  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.346944826  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.346987867  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.347011099  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.376859410  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.376901459  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.376922484  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.410695010  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.410768739  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.410791876  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message
0:00:00.444392398  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1030:gst_h264_parser_parse_pic_timing: Invalid pic_timing SEI NAL with neither CpbDpbDelays nor pic_struct
0:00:00.444433551  8394 0xaaaae0e16d80 WARN       codecparsers_h264 gsth264parser.c:1370:gst_h264_parser_parse_sei_message: error parsing "Sei message"
0:00:00.444454512  8394 0xaaaae0e16d80 WARN               h264parse gsth264parse.c:620:gst_h264_parse_process_sei:<h264parse0> failed to parse one or more SEI message

type or paste code here