Is there a way to push rtsp stream to remote IP address with gstreamer on Jetson Nano ?
The similar example using ffmpeg might be (some parameters are omitted):
ffmpeg -re -i inputfile.mp4 -pix_fmt yuv420p -vsync 1 -vcodec libx264 -acodec aac -rtsp_transport udp -f rtsp rtsp://username:firstname.lastname@example.org:1935/live/myStream
We want the gstreamer way, eg. test-launch.
The usage is that the remote machine cannot get IP address of Nano (either remote machine is on public internet and Nano is behind NAT, or for other reasons) thus cannot do in ‘pull’ mode. We need a way to push rtsp stream from Nano to remote machine(known IP address and accessible from Nano).
Currently we are using ‘pull’ mode, on Jetson Nano we capture video, encode it, write to udpsink, then use test-launch play as rtsp server, the remote machine can use gst-launch or vlc or ffmpeg to play from Nano.
Here is illustrative example:
capture video send to udpsink
gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=352,height=288 ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5500
rtsp server relay to rtsp stream
test-launch “( udpsrc port=5500 caps=“application/x-rtp,media=(string)video,encoding-name=(string)H264,clock-rate=(int)90000” ! queue ! rtph264depay ! rtph264pay name=pay0 pt=96 )” -p 8554
play on remote machine
gst-launch-1.0 playbin uri=rtsp://<Nano_IP_Address>:8554/test
Seems below topic does not solve my problem: