How to do RTSP streaming from two camera at diff port


i have two USB camera. i want to stream it to the two diff port. i am using test-launch.c code of RTSP server github repository.

below is the pipeline i am using for streaming on my device:
terminal 1:

./test-launch1 “v4l2src device=/dev/video0 ! videoconvert ! x264enc ! rtph264pay name=pay0 pt=96”

terminal 2:

./test-launch2 “v4l2src device=/dev/video1 ! videoconvert ! x264enc ! rtph264pay name=pay1 pt=97”

on client side i am open below url on vlc player to get video:



i am able to get only one of them. please let me know what can i do to let it work.

The default port is 8554. You can configure it to other value.

nvidia@nvidia-desktop:~$ ./test-launch --help
  test-launch [OPTION?] <launch line> - Test RTSP Server, Launch

Example: "( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )"

Help Options:
  -h, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

Application Options:
  -p, --port=PORT                   Port to listen on (default: 8554)

Hi, DaneLLL

Thanks for your reply. it’s working now.