Page 1 of 1

streaming using RTP does not detect a connection loess

Posted: 01 Sep 2011 17:15
by captainst
Hello Everyone,

I am not sure if here is the position to post this question:

I am using the libvlc to "push" a stream using RTP to another computer.
RTP, being a UDP based protocol, does not have a "connection". So even I push the stream to an invalid IP/port, the function returns correct.
Sample Code:

Code: Select all

media = libvlc_media_new_location (vlc, "c:\test.mkv"); libvlc_media_add_option (media, "--sout=#udp{dst=192.168.55.102,port=1234}"); //push to 192.168.55.102, port 1234 libvlc_media_add_option (media, "--no-sout-display"); player = libvlc_media_player_new(vlc); libvlc_media_player_set_media(player,media); libvlc_media_player_play (player);
So, does that mean I am not able to detect the connection loss (for example, the target PC down) from this program ?

Many thanks again!

Re: streaming using RTP does not detect a connection loess

Posted: 01 Sep 2011 22:14
by Rémi Denis-Courmont
With UDP, you can't detect a missing receiver. In some cases, you can get a clue from the ICMP errors. But this is unreliable. Thus VLC ignores ICMP errors to protect against trivial DoS.

You really should use RTSP or HTTP if you want to stop sending when the receiver dies.

Re: streaming using RTP does not detect a connection loess

Posted: 02 Sep 2011 05:11
by captainst
With UDP, you can't detect a missing receiver. In some cases, you can get a clue from the ICMP errors. But this is unreliable. Thus VLC ignores ICMP errors to protect against trivial DoS.

You really should use RTSP or HTTP if you want to stop sending when the receiver dies.
Thank you very much Rémi Denis. I think that the VLC (lib) does not use RTSP or HTTP to "push" a stream to a remote IP, but rather publishing the stream locally as a server. Is there an option to "push" a stream using HTTP ?

Thanks again!