Host video from several rstp services

Topics: Question
Mar 31, 2016 at 6:28 PM
Hello.

I am trying to configure RstpServer to share video from several rstp sources.
I have configured server according to unittest sample you provided.
Added several rstp addresses using
server.TryAddMedia(new Media.Rtsp.Server.MediaTypes.RtspSource(name, location, Media.Rtsp.RtspClient.ClientProtocolType.Tcp, 8192, null, null, null, false ));
but unfortunately it doesnt work.
VLC is able to play only video from one source, when I try to open other sources (rstp://localhost/live/2, rstp://localhost/live/3 and etc) the video on other VLC's just freezes.
I have tried to play with buffer value (8192, 16384, 32768), but this doesn't help much.

Sometimes picture freezes even if try to open one VLC.
Here is a part of log file:

from=192.168.1.40:55979
Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@SendRecieve - Begin
Response:RTSP/1.0 200
Session: 695309299;timeout=30
CSeq: 6
Range: npt=now-
RTP-Info: url=rtsp://192.168.1.40/live/ca5234e5-5806-48e8-961b-f3e3ee0f0104/audio;seq=-17327;rtptime=-2052382391, url=rtsp://192.168.1.40/live/ca5234e5-5806-48e8-961b-f3e3ee0f0104/video;seq=10810;rtptime=955730407
Server: ASTI Media Server RTSP 1.0
Date: Thu, 31 Mar 2016 18:23:29 GMT


from=192.168.1.40:55979
Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@ParseAndCompleteData - Remaining= 4
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet 544371827@250 Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@ParseAndCompleteData - Remaining= 4
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet 544371827@250 Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@ParseAndCompleteData - Remaining= 4
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet 544371827@250 Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@ParseAndCompleteData - Remaining= 4
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet 544371827@250 Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@HandleIncomingRtcpPacket Set RemoteSynchronizationSourceIdentifier @ RR 1051404771 to=1051404771RR blockId=1051404771
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet -596603150@202
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet -637671927@202 Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@SendRecieve - No RecentActivity and Unable to Poll RtcpSocket, LastReportsReceived = -10675199.02:48:05.4775808, taken =00:00:00
RestartFaultedStreams
DisconnectAndRemoveInactiveSessions
Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 218 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 190 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 194 for Channel 0 remainingInBuffer=4
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet -596603150@202
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet -637671927@202 Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 177 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 177 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 483 for Channel 2 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 258 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 245 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 211 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 188 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 188 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-f6c066a1-ea8b-4c51-994a-7eeef1f06c0c@ProcessFrameData - Needs data for packet fields inspection Packet of 352 for Channel 2 remainingInBuffer=4
Media.Rtp.RtpClient-2e007438-ef84-4c46-b6dc-8ac078e4f96c@SendRecieve - No RecentActivity and Unable to Poll RtcpSocket, LastReportsReceived = -10675199.02:48:05.4775808, taken =00:00:00
2e007438-ef84-4c46-b6dc-8ac078e4f96cHandleIncomingRtcpPacket - No Context for packet -637671927@202 Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 180 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 202 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 192 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 196 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 208 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-5c05fd76-62b3-47b4-a7d2-b1b6e3b13e74@ProcessFrameData - Needs data for packet fields inspection Packet of 256 for Channel 0 remainingInBuffer=4
Media.Rtp.RtpClient-a3c497c3-af15-4865-b6e5-6a277434fa20@ProcessFrameData - Needs data for packet fields inspection Packet of 1024 for Channel 2 remainingInBuffer=4

All sources are working fine if I open them in VLC without RstpServer.
Could you please provide any suggestions?
Is RstpServer capable of handling video from several sources?

Thank you, Alex.
Coordinator
Apr 2, 2016 at 2:38 PM
Thanks for your interest in the project!

Indeed it should support multiple viewers...

What is the RtspServer's Endpoint for listening.

Can you post the session description and possibly a Wireshark capture so I can investigate further?

Can you also try with two different players e.g. MPlayer or QuickTime and vlc or ffmpeg?

I have also recently reduced the polling times in the RtspClient which probably will help also.

Thanks for bringing this up and I will help you get it resolved.
Marked as answer by juliusfriedman on 4/2/2016 at 7:38 AM