Can VLC serve RTSP using TCP only?

About encoding, codec settings, muxers and filter usage
TVEng
New Cone
New Cone
Posts: 6
Joined: 03 Jun 2009 05:58

Can VLC serve RTSP using TCP only?

Postby TVEng » 02 Jul 2010 20:22

I have been doing no less than a trillion searches in an attempt to answer my own question but to no avail. Can anyone comment on whether or not VLC can serve audio/video via RTSP using TCP only? The server calling back to the client via UDP obviously makes it near impossible for clients behind a NAT firewall to view the stream. For this reason, most RTSP servers now allow RTSP over TCP to make firewall issues go away. I have tried putting Darwin between my server and clients to fix this but honestly Darwin is a unreliable POS for this application and rarely gets it right.

I know that as a client VLC can do this. But as a server, it seems to not.

An example of RTSP over TCP behavior can be found here: rtsp://video2.multicasttech.com/AFTVHorror3GPP296.sdp
Last edited by TVEng on 02 Jul 2010 21:12, edited 1 time in total.

Rémi Denis-Courmont
Developer
Developer
Posts: 15330
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can VLC serve RTSP using TCP only?

Postby Rémi Denis-Courmont » 02 Jul 2010 20:41

No. It is feasible. But it would be hell to integrate with the code as the concept violates so many layers. Some people stepped up to do it, but never actually did.

That said, as far as traversal is concerned, HTTP works a lot better with the same advantagse of disadvantages of TCP vs UDP.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

TVEng
New Cone
New Cone
Posts: 6
Joined: 03 Jun 2009 05:58

Re: Can VLC serve RTSP using TCP only?

Postby TVEng » 02 Jul 2010 20:56

the concept violates so many layers
Do you mean that is difficult for the existing VLC codebase to do, or are you suggesting that its difficult to do in general? The most popular RTSP servers on Earth (Youtube comes to mind) do it this way by default because RTSP over UDP breaks if you just look at it wrong.
HTTP works a lot better
Yes, it does but then we aren't really talking about true RTSP anymore. You can do pretty much anything "over HTTP" reliably, but when your client can only do RTSP via TCP or UDP (99% of smartphones), it is not an option.

Are you aware of any "translating" or "reflecting" software other than Darwin [broken] and Wowza [$$$] that could sit in the middle and eliminate the UDP problems by converting to TCP-only?

Rémi Denis-Courmont
Developer
Developer
Posts: 15330
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Can VLC serve RTSP using TCP only?

Postby Rémi Denis-Courmont » 06 Jul 2010 18:00

the concept violates so many layers
Do you mean that is difficult for the existing VLC codebase to do, or are you suggesting that its difficult to do in general?
It is difficult to add "after the fact" to the "clean" RTSP server architecture found in VLC - which was in fact designed with HTTP in mind.

And in general, it is quite inefficient.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 23 guests