Live streaming on the nano via RTSP(test-launch server)

Hey, I apologize for the spam but I’ve been trying a lot of ways to get this working but to no avail.

I modified this streaming pipeline :

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=1848, framerate=28/1, format=NV12'  ! nvvidconv left=200 right=3080 top=600 bottom=1200 !  'video/x-raw,width=2880, height=600, framerate=28/1, format=NV12, pixel-aspect-ratio=1/1' ! nvvidconv ! nvv4l2h264enc ! h264parse ! flvmux ! rtmpsink location='rtmp://localhost/live/'

to this :

./test-launch "gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=1848, framerate=28/1, format=NV12'  ! nvvidconv left=200 right=3080 top=600 bottom=1200 !  'video/x-raw,width=2880, height=600, framerate=28/1, format=NV12, pixel-aspect-ratio=1/1' ! nvvidconv ! nvv4l2h264enc ! h264parse ! flvmux ! rtspsink location='rtsp://localhost:8554/live'"

However when I ran the program, I get this error :

gan@gan-desktop:~/gst-rtsp-server/examples$ ./test-launch "gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=1848, framerate=28/1, format=NV12'  ! nvvidconv left=200 right=3080 top=600 bottom=1200 !  'video/x-raw,width=2880, height=600, framerate=28/1, format=NV12, pixel-aspect-ratio=1/1' ! nvvidconv ! nvv4l2h264enc ! h264parse ! flvmux ! rtspsink location='rtsp://localhost:8554/live'"
stream ready at rtsp://127.0.0.1:8554/test

(test-launch:8038): GStreamer-CRITICAL **: 21:34:17.698: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

(test-launch:8038): GStreamer-CRITICAL **: 21:34:17.704: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

(test-launch:8038): GStreamer-CRITICAL **: 21:34:17.754: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

(test-launch:8038): GStreamer-CRITICAL **: 21:34:17.754: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

Something I think could be the issue is the last part, the rtspsink location.

I changed it the rtspsink location to rtspsrc location

and I get no errors but I can’t receive it via VLC nor openCV

For reference, i typed this into vlc and opencv :

rtsp://192.168.1.34:8554/live

This is the nano’s IP address.

Thank you!

You may first try:

./test-launch "<s>gst-launch-1.0</s> nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3280, height=1848, framerate=28/1, format=NV12 ! nvvidconv left=200 right=3080 top=600 bottom=1200 ! video/x-raw,width=2880, height=600, framerate=28/1, format=NV12, pixel-aspect-ratio=1/1 ! nvvidconv ! nvv4l2h264enc !<b> video/x-h264, profile=baseline, stream-format=byte-stream ! h264parse ! rtph264pay name=pay0 pt=96 config-interval=1</b> "

You would first check if it works from nano itself with:

gst-launch-1.0 rtspsrc location=rtsp://192.168.1.34:8554/test ! application/x-rtp, media=video ! queue ! rtph264depay ! h264parse ! nvv4l2h264dec ! videoconvert ! xvimagesink

Hi! The first line of code works, and it says it is streaming! :

stream ready at rtsp://127.0.0.1:8554/test

Can I know how would I be able to receive it? Also, where does the stream go to? My ip address? But from the first pipleline you gave me, I did not state the IP address so how would the nano know?

Thank you!

Although it says it’s streaming, it wouldn’t work fine because I did not pay attention to the beginning of your pipeline, sorry.
gst-launch is a tool for launching a pipeline from a terminal.
I’ve edited my previous post for reflecting that.

So once it streams you would try the second command in another terminal. I had assumed that your jetson had static IP address 192.168.1.34, you may check with ifconfig. If not ok, you may try using 127.0.0.1.

If it is ok you should be able to see your camera. Stop this client, and from your host you would use something more generic like:

gst-launch-1.0 rtspsrc location=rtsp://192.168.1.34:8554/test ! application/x-rtp, media=video ! queue ! decodebin ! autovideosink

Hi honey, May I ask how would you optimize the code you provided:

./test-launch "nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3280, height=1848, framerate=28/1, format=NV12 ! nvvidconv left=200 right=3080 top=600 bottom=1200 ! video/x-raw,width=2880, height=600, framerate=28/1, format=NV12, pixel-aspect-ratio=1/1 ! nvvidconv ! nvv4l2h264enc ! video/x-h264, profile=baseline, stream-format=byte-stream ! h264parse ! rtph264pay name=pay0 pt=96 config-interval=1 "

I was thinking of moving to h265 and maybe enabling max performace(not sure how yet). Do you have any other ways of reducing the latency?
Thank you!