Discarding data packets received when we have no header

Hi,

I am trying to send 4k (4096*2160) stream at 30 fps, format JPEG natively compressed from Logitech BRIO camera over a local network using RTP payload and try to read it from a udpsrc at the receiver machine. Both sender and receiver use gstreamer.

At the receiver side, I am using rtpjpegdepay, but I keep receiving the following message, without displaying anything:

rtpjpegdepay gstrtpjpegdepay.c:759:gst_rtp_jpeg_depay_process: discarding data packets received when we have no header

I tried to increase the kernel buffers (net.core.rmem_max, net.core.rmem_default, net.core.wmem_max, net.core.wmem_default) and set them to high values (ex: 200000000) , but still getting the same error!

I tried also to increase the MTU but I get at the receiver “bad data” or something similar, without resolving the issue.

I tried also with H264 with rtph264depay, I still get packets discarded.

Any hint with this issue, please?

Regards,

Hi,
Please check if you can decode the stream through uridecodebin:

$ gst-launch-1.0 uridecodebin uri=rtsp://__RTSP_IP_ADDRESS__ ! nvoverlaysink

Hi, Thank you for your answer.

I just tried it, and I get the same message. Please see below the last part of the shell output.

Regards,

0:02:16.279759502 12315 0x7ff4d4005770 WARN rtpjpegdepay gstrtpjpegdepay.c:759:gst_rtp_jpeg_depay_process: discarding data packets received when we have no header
0:02:16.279769441 12315 0x7ff4d4005770 WARN rtpjpegdepay gstrtpjpegdepay.c:759:gst_rtp_jpeg_depay_process: discarding data packets received when we have no header
0:02:16.279781415 12315 0x7ff4d4005770 WARN rtpjpegdepay gstrtpjpegdepay.c:741:gst_rtp_jpeg_depay_process: warning: Invalid Dimension 0x0.
0:02:16.279905899 12315 0x563d901b0590 WARN rtspmedia rtsp-media.c:2994:wait_preroll: failed to preroll pipeline
0:02:16.279915101 12315 0x563d901b0590 WARN rtspmedia rtsp-media.c:3298:gst_rtsp_media_prepare: failed to preroll pipeline
0:02:16.280005257 12315 0x7ff4d4005770 WARN rtpjpegdepay gstrtpjpegdepay.c:759:gst_rtp_jpeg_depay_process: discarding data packets received when we have no header
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
Got state-changed message
GST_MESSAGE_STATE_CHANGED.64
0:02:16.280579093 12315 0x563d901b0590 ERROR rtspclient rtsp-client.c:1054:find_media: client 0x563d9032f0e0: can’t prepare media
send-message …
0:02:16.280679612 12315 0x563d901b0590 ERROR rtspclient rtsp-client.c:2910:handle_describe_request: client 0x563d9032f0e0: no media
client_closed …

Hi,
Please try the pipeline:

$ gst-launch-1.0 rtspsrc location=rtsp://__RTSP_IP_ADDRESS__ ! rtpjpegdepay ! jpegparse ! jpegdec ! videoconvert ! xvimagesink

The pipeline is constructed with gstreamer native plugins. Let’s see if it works.

Hi,

the same result, it fails at “rtpjpegdepay” level once the client connects.

I also tried to play it directly from the source (i.e. from the Xavier itself) with the following pipelines:
$ gst-launch-1.0 --gst-debug=3 v4l2src device=/dev/video0 ! “image/jpeg,width=(int)4096,height=(int)2160,pixel-aspect-ratio=1/1,type=video,framerate=30/1” ! jpegparse ! nvjpegdec ! videoconvert ! xvimagesink

or

$ gst-launch-1.0 --gst-debug=3 v4l2src device=/dev/video0 ! “image/jpeg,width=(int)4096,height=(int)2160,pixel-aspect-ratio=1/1,type=video,framerate=30/1” ! jpegparse ! jpegdec ! videoconvert ! xvimagesink

In this case it shows only the fist picture and then it freezes with the following errors, knowing that I have activated jetson_clocks with the fan.

(gst-launch-1.0:6618): GStreamer-CRITICAL **: 12:16:29.789: gst_date_time_new_local_time: assertion ‘(month > 0 && month <= 12) || month == -1’ failed

(gst-launch-1.0:6618): GStreamer-CRITICAL **: 12:16:29.789: gst_mini_object_unref: assertion ‘mini_object != NULL’ failed
0:00:12.917592326 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x213

(gst-launch-1.0:6618): GStreamer-CRITICAL **: 12:16:29.790: gst_date_time_new_local_time: assertion ‘(month > 0 && month <= 12) || month == -1’ failed

(gst-launch-1.0:6618): GStreamer-CRITICAL **: 12:16:29.790: gst_mini_object_unref: assertion ‘mini_object != NULL’ failed
0:00:12.917858608 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x9004
0:00:12.917895601 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x9101
0:00:12.917937907 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x9102
0:00:12.917965524 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x9203
0:00:12.917998357 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x9205
0:00:12.918033558 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0x9208
0:00:12.918068919 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0xa20b
0:00:12.918110361 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0xa001
0:00:12.918138266 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0xa002
0:00:12.918164059 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0xa003
0:00:12.918188539 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0xa005
0:00:12.918240157 6618 0x559c43aad0 WARN default gstexiftag.c:1750:parse_exif_ifd: Unmapped exif tag: 0xa40c

Regards,

Hi,
It seems like the source does not produce valid JPEG frames. Please check if it supports other formats:

$ v4l2-ctl -d /dev/video0 --list-formats-ext

If it supports YUV422 such as YUYV or UYVY, you may set to the format and try.

Hi,

Logitech BRIO does produce YUY2 and NV12 formats in addition to JPEG. But, for UHD and 4K resolutions, it produces them only in JPEG format. Please see below the formats and resolutions list that BRIO can produce.

Regards,

video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)896, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)800, height=(int)600, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)800, height=(int)448, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)440, height=(int)440, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;

    video/x-raw, format=(string)YUY2, width=(int)480, height=(int)270, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)340, height=(int)340, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;

    video/x-raw, format=(string)YUY2, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)4096, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)2560, height=(int)1440, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 60/1, 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)1600, height=(int)896, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 90/1, 60/1, 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)800, height=(int)600, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)800, height=(int)448, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 120/1, 90/1, 60/1, 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)480, height=(int)270, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    image/jpeg, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

    video/x-raw, format=(string)NV12, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 24/1, 20/1, 15/1, 10/1, 15/2, 5/1 };

Hi,
Please try this pipeline: