Streaming video+audio from capture device to rtsp server

I want to stream video+audio from capture device to rtsp server:

I made a pipeline which creates mp4 file from capture device

gst-launch-1.0 ! v4l2src device=/dev/video0 ! 'video/x-raw, format=YUY2' ! nvvidconv ! nvv4l2h265enc bitrate=3000000 ! mux. alsasrc device="hw:2,0" ! audioconvert ! voaacenc bitrate=192000 ! queue ! mux. mpegtsmux name=mux ! filesink location=test.mp4

problem is when I try to remake this pipeiine for streaming from CD to RTSP

gst-launch-1.0 ! v4l2src device=/dev/video0 ! 'video/x-raw, format=YUY2' ! nvvidconv ! nvv4l2h265enc bitrate=3000000 ! mux. alsasrc device="hw:2,0" ! audioconvert ! voaacenc bitrate=192000 ! queue ! mux. mpegtsmux name=mux ! rtspclientsink location=rtsp://192.168.1.101:8554/stream

VLC just transmit sound with no video though it show that stream have 2 channels.

After some testing and splitting I found that

gst-launch-1.0 ! v4l2src device=/dev/video0 ! 'video/x-raw, format=YUY2' ! nvvidconv ! nvv4l2h265enc bitrate=3000000 ! rtspclientsink location=rtsp://192.168.1.101:8554/stream

pure video stream without mpegtsmux, show video but without sound

gst-launch-1.0 ! v4l2src device=/dev/video0 ! 'video/x-raw, format=YUY2' ! nvvidconv ! nvv4l2h265enc bitrate=3000000 ! mpegtsmux ! rtspclientsink location=rtsp://192.168.1.101:8554/stream

dont show any video, just blank screen,

gst-launch-1.0 ! v4l2src device=/dev/video0 ! 'video/x-raw, format=YUY2' ! videoconvert ! x264enc bitrate=3000000 ! mpegtsmux ! rtspclientsink location=rtsp://192.168.1.101:8554/stream

show video

gst-launch-1.0 ! v4l2src device=/dev/video0 ! 'video/x-raw, format=YUY2' ! videoconvert ! x265enc bitrate=3000000 ! mpegtsmux ! rtspclientsink location=rtsp://192.168.1.101:8554/stream

also dont show any videos.

As far as i know MPEGTS support H265, so I think this is bug in nvv4l2h265 and mpegtsmux connection or i dont understand something.

Hi,
Generally we run test-launch to set up RTSP server. Please refer to
Jetson Nano FAQ

Q: Is there any example of running RTSP streaming?

Running RTSP server in gst-launch-1.0 command may not work. We generally run UDP through gst-launch-1.0

Thank you for your help. There is little misunderstanding. I need to make which stream data to another server with installed RTSP server.

Hi,
You may refer to this command and give it a try:
Implementing rtsp streaming with audio from usb - #3 by DaneLLL

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.