Rtspclient error unsupported transport RTP/AVP when switching webcams

Hello there,

I’ve been working with 2 ISP cameras for a rtsp video stream with this working example.

Using the test-multicast.c example… this is the pipe that works.

gst_rtsp_media_factory_set_launch (factory, "( "
      "nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1920 sink_0::height=2160 sink_1::xpos=1920 sink_1::ypos=0 sink_1::width=1920 sink_1::height=2160 ! nvvidconv ! video/x-raw(memory:NVMM) ! nvv4l2h264enc bitrate=60000000 ! h264parse ! rtph264pay name=pay0 pt=96 alsasrc ! audioconvert ! avenc_aac ! aacparse ! rtpmp4apay name=pay1 nvarguscamerasrc sensor_id=1 ! video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1 ! nvvidconv flip-method=2  ! video/x-raw(memory:NVMM),width=1920, height=1080, format=RGBA ! queue ! comp. nvarguscamerasrc sensor_id=0 ! video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=RGBA ! queue ! comp. " ")");

Now, i wanted to try different cameras, this time are USB. I made some changes but i got an error i’m not able to find anywhere.

Error: unsupported transport RTP/AVP;unicast;client_port=59496-59497

Here’s the new pipeline.

gst_rtsp_media_factory_set_launch (factory, "( "
      "nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=720 sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=720 ! nvvidconv ! video/x-raw(memory:NVMM) ! nvv4l2h264enc bitrate=60000000 ! h264parse ! rtph264pay name=pay0 pt=96 alsasrc ! audioconvert ! avenc_aac ! aacparse ! rtpmp4apay name=pay1 v4l2src device=/dev/video1 ! video/x-raw, format=(string)YUY2, width=640, height=360,pixel-aspect-ratio=(fraction)1/1, framerate=30/1 ! nvvidconv flip-method=2  ! video/x-raw(memory:NVMM),width=640, height=360, format=RGBA ! queue ! comp. v4l2src device=/dev/video0 ! video/x-raw,format=(string)YUY2,width=640, height=360, pixel-aspect-ratio=(fraction)1/1, framerate=30/1 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM),width=640, height=360, framerate=30/1, format=RGBA ! queue ! comp. " ")");

And this is the output from gst-device-monitor-1.0

Device found:

	name  : GENERAL WEBCAM
	class : Video/Source
	caps  : video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        image/jpeg, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	        image/jpeg, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
	properties:
		udev-probed = true
		device.bus_path = platform-70090000.xusb-usb-0:2.4:1.0
		sysfs.path = /sys/devices/70090000.xusb/usb1/1-2/1-2.4/1-2.4:1.0/video4linux/video1
		device.bus = usb
		device.subsystem = video4linux
		device.vendor.id = 1b3f
		device.vendor.name = GENERAL
		device.product.id = 2002
		device.product.name = "GENERAL\ WEBCAM"
		device.serial = GENERAL_GENERAL_WEBCAM
		device.capabilities = :capture:
		device.api = v4l2
		device.path = /dev/video1
		v4l2.device.driver = uvcvideo
		v4l2.device.card = "GENERAL\ WEBCAM"
		v4l2.device.bus_info = usb-70090000.xusb-2.4
		v4l2.device.version = 264701 (0x000409fd)
		v4l2.device.capabilities = 2216689665 (0x84200001)
		v4l2.device.device_caps = 69206017 (0x04200001)
	gst-launch-1.0 v4l2src device=/dev/video1 ! ...

Thanks in advance.

Hi,
For further investigation, you can run gst-launch-1.0 + fakesink command and check if the pipeline is valid like:

$ gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=720 sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=720 ! nvvidconv ! video/x-raw(memory:NVMM) ! nvv4l2h264enc bitrate=60000000 ! h264parse ! rtph264pay name=pay0 pt=96 ! fakesink alsasrc ! audioconvert ! avenc_aac ! aacparse ! rtpmp4apay name=pay1 ! fakesink v4l2src device=/dev/video1 ! video/x-raw, format=(string)YUY2, width=640, height=360,pixel-aspect-ratio=(fraction)1/1, framerate=30/1 ! nvvidconv flip-method=2  ! video/x-raw(memory:NVMM),width=640, height=360, format=RGBA ! queue ! comp. v4l2src device=/dev/video0 ! video/x-raw,format=(string)YUY2,width=640, height=360, pixel-aspect-ratio=(fraction)1/1, framerate=30/1 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM),width=640, height=360, framerate=30/1, format=RGBA ! queue ! comp.

And can try to replace v4l2src with videotestsrc:

gst_rtsp_media_factory_set_launch (factory, "( "
      "nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=720 sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=720 ! nvvidconv ! video/x-raw(memory:NVMM) ! nvv4l2h264enc bitrate=60000000 ! h264parse ! rtph264pay name=pay0 pt=96 alsasrc ! audioconvert ! avenc_aac ! aacparse ! rtpmp4apay name=pay1 videotestsrc is-live=1 ! video/x-raw, format=(string)YUY2, width=640, height=360,pixel-aspect-ratio=(fraction)1/1, framerate=30/1 ! nvvidconv flip-method=2  ! video/x-raw(memory:NVMM),width=640, height=360, format=RGBA ! queue ! comp. videotestsrc is-live=1 ! video/x-raw,format=(string)YUY2,width=640, height=360, pixel-aspect-ratio=(fraction)1/1, framerate=30/1 ! nvvidconv flip-method=2 ! video/x-raw(memory:NVMM),width=640, height=360, framerate=30/1, format=RGBA ! queue ! comp. " ")");

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