Followed the thread of “VLC playing gstreamer flow” to compile the RTSP server on TX2
https://devtalk.nvidia.com/default/topic/1018689/jetson-tx2/vlc-playing-gstreamer-flow/post/5187270/
Was able to stream the video to a local VLC on TX2.
But need help to add audio to the pipeline.
Here are what worked so far. First to compile the test-launch as instructed.
Then to launch a rtsp server on tx2:
$ ./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 \
)"
The video can be viewed on VLC of TX2 with “network stream” URL as “rtsp://127.0.0.1:8554/test”. I couldn’t do “rtsp://:8554/test” on remote devices (laptop, android devices) yet, not even within the WiFi local network, which is a separate issue to be resolved.
A bigger problem is audio. This is a working audio pipeline (with DMIC on csi camera board):
gst-launch-1.0 nvcamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw, width=720, height=480, framerate=30/1, format=NV12’ ! omxh265enc ! mpegtsmux name=mux alsasrc ‘device=hw:tegrasndt186ref,1’ ! audioresample ! audio/x-raw,channels=2 ! queue ! voaacenc bitrate=32000 ! queue ! mux. mux. ! filesink location=1cam_mix_audio.mpg sync=true async=false qos=true
Then if I add the audio portion to the rtsp pipeline:
$ ./test-launch "( \
nvcamerasrc sensor-id=0 \
! video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1, format=NV12 \
! nvvidconv flip-method=5 \
! video/x-raw, width=720, height=480, framerate=30/1, format=NV12 \
! omxh265enc \
! mpegtsmux name=mux alsasrc 'device=hw:tegrasndt186ref,1' \
! audioresample ! audio/x-raw,channels=2 ! queue ! voaacenc bitrate=32000 ! queue ! mux. mux. \
! rtph265pay name=pay0 pt=96 \
)"
Viewing the stream “rtsp://127.0.0.1:8554/test” on VLC would then get an error:
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://127.0.0.1:8554/test'.
Check the log for details.
I first thought the quotation mark in ‘device=hw:tegrasndt186ref,1’ could be the cause of the problem. But I tried \'device=hw:tegrasndt186ref,1\', or simply removed the quotation mark, neither worked.
Any idea?