attempt to figure out csi mipi devboard rtsp

what works

gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov ! 'application/x-rtp, media=(string)video' ! decodebin ! videoconvert ! ximagesink

source

what doesn’t work:

$ ./test-launch "nvcamerasrc ! video/x-raw(memory:NVMM),width=1920,height=1080,format=NV12,frametate=30/1 ! omxh264enc bitrate=10000000 ! rtph264pay name=pay0 pt=96"

test-launch file is built from https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.8.3.tar.xz

$ gst-launch-1.0 rtspsrc location="rtsp://127.0.0.1:8554/test" ! rtph264depay ! h264parse ! omxh264dec ! nvoverlaysink

server terminal

./test-launch "nvcamerasrc ! video/x-raw(memory:NVMM),width=1920,height=1080,format=NV12,frametate=30/1 ! omxh264enc bitrate=10000000 ! rtph264pay name=pay0 pt=96"
stream ready at rtsp://127.0.0.1:8554/test

Available Sensor modes : 
2592 x 1944 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 1 WxH = 2592x1458 FrameRate = 30.000000 ...

Framerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameter

client terminal

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test latency=1000 ! rtph264depay ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5670): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Got error response: 503 (Service Unavailable).
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

when I execute the client terminal command the server window adds the text output as

Available Sensor modes : 
2592 x 1944 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 1 WxH = 2592x1458 FrameRate = 30.000000 ...

Framerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameterFramerate set to : 30 at NvxVideoEncoderSetParameter

Upd1: wit the code it got to work with vlc :

./test-launch "( \
        nvcamerasrc sensor-id=0 \
        ! video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1, format=I420 \
        ! nvvidconv flip-method=4 \
        ! video/x-raw, width=720, height=480, framerate=30/1, format=I420 \
        ! timeoverlay \
        ! omxh265enc \
        ! rtph265pay name=pay0 pt=96 \
        )"

And finally the code below appears to execute without errors.

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test latency=1000 ! rtph265depay ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request

However, it wont display anything.
Update: It will display the output correctly with:

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test  ! 'application/x-rtp, media=(string)video' ! decodebin ! videoconvert ! ximagesink

Moreover, local VLC does play the stream. And there is a chance that a remote VLC +

ssh nvidia@tegraip -L 8554:localhost:855

4 will play [it worked for a while then turned out not to work]

References found:
https://devtalk.nvidia.com/default/topic/1018689/jetson-tx2/vlc-playing-gstreamer-flow/post/5187270/
https://devtalk.nvidia.com/default/topic/1031229/how-to-add-audio-to-gstreamer-pipeline-for-rtsp-streaming/