I am trying to access a CSI camera using GStreamer, encode the camera feed with nvv4l2h264enc and send it via gst-rtsp-server to any clients that want to view the stream.
The pipeline looks like this:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)NV12 ! nvv4l2h264enc bitrate=500000 ! rtph264pay pt=96 name=pay0
When testing this pipeline with vlc, vlc is able to connect to the RTSP server but it is not able to show any data. The error message looks like this (the debug output is pretty big, so I just included the most interesting bits):
[00007f9bec000c40] main input debug: `rtsp://10.0.0.38:5000/test' successfully opened [000055df0ddc98a0] dbus interface debug: Getting property CanSeek [00007f9be4001130] live555 demux warning: no data received in 10s. Switching to TCP Sending request: TEARDOWN rtsp://10.0.0.38:5000/test/ RTSP/1.0 CSeq: 6 User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2018.02.18) Session: MdRgXVlYrRJ5NVSO [00007f9be400dda0] main decoder debug: killing decoder fourcc `h264' [00007f9be400dda0] main decoder debug: removing module "avcodec" [00007f9be400e630] main packetizer debug: removing module "h264" [00007f9bec000c40] main input debug: Program doesn't contain anymore ES Created new TCP socket 21 for connection Connecting to 10.0.0.38, port 5000 on socket 21... ...remote connection opened Sending request: OPTIONS rtsp://10.0.0.38:5000/test RTSP/1.0 CSeq: 2 User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2018.02.18) [00007f9be4001130] live555 demux debug: connection timeout [00007f9be4001130] live555 demux error: Failed to connect with rtsp://10.0.0.38:5000/test [00007f9be4001130] live555 demux error: TCP rollover failed, aborting [00007f9bec000c40] main input debug: EOF reached [00007f9be4001130] main demux debug: removing module "live555" [000055df0dcf65a0] main playlist debug: dead input [000055df0dcf65a0] main playlist debug: changing item without a request (current 0/1) [000055df0dcf65a0] main playlist debug: nothing to play
Now the thing that confuses me is that if I switch the nvv4l2h264enc plugin for the deprecated omxh264enc plugin it magically works. I want to switch to nvv4l2h264enc because it is the supported plugin and AFAIK supports hardware acceleration and omxh264enc does not.
Also, if I use nvv4l2h264enc I get the following critical error message while running the pipeline:
python3:24168): GStreamer-CRITICAL **: 22:19:27.856: gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed (python3:24168): GStreamer-CRITICAL **: 22:19:27.857: gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed
I do not understand what the underlying issue is. Did I forget to configure an option with the nvv4l2h264enc encoder?
I am using a Jetson Nano with Multimedia API version 32.1.
Any help is much appreciated.