Hello,
I’m trying to use IMX390 cameras with Sony’s SerDes board by gstreamer.
At now, I have confirmed that the following script displays live video from the cameras and simultaneously saves it as an MP4 file (with four cameras running simultaneously).
#/bin/bash
SENSOR_ID=${1:-"0"}
echo "SENSOR_ID: $SENSOR_ID"
gst-launch-1.0 -e -v nvarguscamerasrc sensor-id="$SENSOR_ID" sensor_mode=0 exposuretimerange='11000000 11000
000' ee-mode='0' ispdigitalgainrange='1 8' ! 'video/x-raw(memory:NVMM), width=1936, height=1220, framerate=(fraction)50/1, format=NV12' ! tee name=t \
t. ! queue ! nvvidconv flip-method=0 ! fpsdisplaysink video-sink=xvimagesink text-overlay=false sync=fal
se \
t. ! queue ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=/media/fmp/t503/output_"$SENSOR_ID".mp4
(Suppose this script name as showandrec.sh, use showandrec.sh 0-3)
And now, I’m trying to add RTSP streaming to this script but RTSP does not work at all.
First, I installed gst-rtsp-server (gst-rtsp-server) version 1.16.3.
To keep the situation simpler, as the first step, I’m writing nvargcamerasrc RTSP script like this.
GST_DEBUG=3 test-launch "nvarguscamerasrc sensor-id=0 sensor_mode=0 exposuretimerange='11000000 11000000' ee
-mode=0 ispdigitalgainrange='1 8' ! video/x-raw(memory:NVMM), width=1936, height=1220, framerate=50/1, forma
t=NV12 ! tee name=t \
t. ! queue ! nvvidconv ! video/x-raw(memory:NVMM), width=480, height=300, format=NV12 ! nvv4l2h264en
c ! h264parse ! rtph264pay name=pay0 pt=96"
But nothing is displayed on local VLC (with rtsp://localhost:8554/test). The log of test-launch is
stream ready at rtsp://127.0.0.1:8554/test
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : '11000000 11000000'
GST_ARGUS: NvArgusCameraSrc: Setting ISP Digital Gain Range : '1 8'
Opening in BLOCKING MODE
0:00:28.187827488 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881b8470 Failed to determine interlace mode
0:00:28.187877824 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881b8470 Failed to determine interlace mode
0:00:28.187895488 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881b8470 Failed to determine interlace mode
0:00:28.187910144 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881b8470 Failed to determine interlace mode
0:00:28.187980320 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:4561:gst_v4l2_object_probe_caps:<nvv4l2h264enc0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:28.188745536 3183 0xffff5800be40 FIXME default gstutils.c:3980:gst_pad_create_stream_id_internal:<nvarguscamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
0:00:28.197121568 3183 0xffff5800bde0 WARN v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<nvv4l2h264enc0:pool:src> Uncertain or not enough buffers, enabling copy threshold
GST_ARGUS: Creating output stream
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line
44)
Error generated. gstnvarguscamerasrc.cpp, threadInitialize:493 Failed to create FrameConsumer
Error generated. gstnvarguscamerasrc.cpp, threadFunction:409 (propagating)
Error generated. gstnvarguscamerasrc.cpp, waitRunning:371 Invalid thread state 3
Error generated. gstnvarguscamerasrc.cpp, execute:1569 (propagating)
0:00:48.141854271 3183 0xaaab15062860 WARN rtspmedia rtsp-media.c:3272:wait_preroll: failed to preroll pipeline
0:00:48.141930270 3183 0xaaab15062860 WARN rtspmedia rtsp-media.c:3652:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:48.146679413 3183 0xaaab15062860 ERROR rtspclient rtsp-client.c:1077:find_media: client 0xaaab14f30ac0: can't prepare media
0:00:48.147414537 3183 0xaaab15062860 ERROR rtspclient rtsp-client.c:2963:handle_describe_request: client 0xaaab14f30ac0: no media
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : '11000000 11000000'
GST_ARGUS: NvArgusCameraSrc: Setting ISP Digital Gain Range : '1 8'
Opening in BLOCKING MODE
0:00:48.188222868 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881eb510 Failed to determine interlace mode
0:00:48.188280723 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881eb510 Failed to determine interlace mode
0:00:48.188312466 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881eb510 Failed to determine interlace mode
0:00:48.188339762 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:2420:gst_v4l2_object_add_interlace_mode:0xffff881eb510 Failed to determine interlace mode
0:00:48.188399761 3183 0xaaab15062b60 WARN v4l2 gstv4l2object.c:4561:gst_v4l2_object_probe_caps:<nvv4l2h264enc1:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:48.189017032 3183 0xffff5800be40 FIXME default gstutils.c:3980:gst_pad_create_stream_id_internal:<nvarguscamerasrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
0:00:48.191390147 3183 0xffff5800bde0 WARN v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<nvv4l2h264enc1:pool:src> Uncertain or not enough buffers, enabling copy threshold
GST_ARGUS: Creating output stream
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter: (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line
44)
Error generated. gstnvarguscamerasrc.cpp, threadInitialize:493 Failed to create FrameConsumer
Error generated. gstnvarguscamerasrc.cpp, threadFunction:409 (propagating)
Error generated. gstnvarguscamerasrc.cpp, execute:1567 (propagating)
0:01:08.150286924 3183 0xaaab15062860 WARN rtspmedia rtsp-media.c:3272:wait_preroll: failed to preroll pipeline
0:01:08.150359564 3183 0xaaab15062860 WARN rtspmedia rtsp-media.c:3652:gst_rtsp_media_prepare: failed to preroll pipeline
0:01:08.156084564 3183 0xaaab15062860 ERROR rtspclient rtsp-client.c:1077:find_media: client 0xffff5800d350: can't prepare media
0:01:08.156702321 3183 0xaaab15062860 ERROR rtspclient rtsp-client.c:2692:handle_setup_request: client 0xffff5800d350: media '/test' not found
Why it does not work?
Regards,