I wrote a simple pipeline in C.
nvarguscamerasrc → nvv4l2h264enc → h264parse → rtph264pay ->udpsink.
I can compile and execute it, but when I connect to the stream with VLC, I cannot see a picture, but the “timer” of VLC is running.
I exported GST_DEBUG=3 for better debugging.
This is the output until I connect to the stream:
*** RTSP STREAM at rtsp:localhost:8554/gt ***
Opening in BLOCKING MODE
Opening in BLOCKING MODE
0:00:00.132187637 7766 0x55b4e5c0c0 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55b4e29d90 Failed to determine interlace mode
0:00:00.132285350 7766 0x55b4e5c0c0 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55b4e29d90 Failed to determine interlace mode
0:00:00.132344520 7766 0x55b4e5c0c0 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55b4e29d90 Failed to determine interlace mode
0:00:00.132454370 7766 0x55b4e5c0c0 WARN v4l2 gstv4l2object.c:4434:gst_v4l2_object_probe_caps:<encode:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Running...
0:00:00.134016222 7766 0x55b4e22280 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
0:00:00.139545834 7766 0x55b4e22280 WARN v4l2bufferpool gstv4l2bufferpool.c:1065:gst_v4l2_buffer_pool_start:<encode:pool:src> Uncertain or not enough buffers, enabling copy threshold
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
H264: Profile = 66, Level = 0
0:00:01.064447748 7766 0x55b4e221e0 WARN v4l2bufferpool gstv4l2bufferpool.c:1512:gst_v4l2_buffer_pool_dqbuf:<encode:pool:src> Driver should never set v4l2_buffer.field to ANY
And when I connect to it, I also get this.
sensor:7766): GLib-GObject-WARNING **: 08:01:47.172: g_object_get_is_valid_property: object class 'GstUDPSrc' has no property named 'pt'
0:01:16.368927264 7766 0x7f8c018630 WARN rtspstream rtsp-stream.c:3538:gst_rtsp_stream_get_rtpinfo: Could not get payloader stats
0:01:16.369057476 7766 0x7f8c018630 FIXME rtspmedia rtsp-media.c:3841:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:01:16.955577333 7766 0x7f8c018630 FIXME rtspmedia rtsp-media.c:3841:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:01:16.955655355 7766 0x7f8c018630 WARN rtspmedia rtsp-media.c:3867:gst_rtsp_media_suspend: media 0x7f6000d2c0 was not prepared
0:01:18.307973796 7766 0x7f8c018630 FIXME rtspclient rtsp-client.c:1657:handle_play_request:<GstRTSPClient@0x7f8c019db0> Add support for seek style (null)
0:01:18.308637927 7766 0x7f8c018630 FIXME rtspmedia rtsp-media.c:2437:gst_rtsp_media_seek_full:<GstRTSPMedia@0x7f6000d2c0> Handle going back to 0 for none live not seekable streams.
It is also very strange that htop shows around 15 /usr/sbin/nvargus-deamon
processes and responsiveness gets really bad.
For the RTSP server code I adapted the code from this post.
Do you have an idea why I cannot see the stream?