streaming using RTP does not detect a connection loess

This forum is about all development around libVLC.
captainst
Blank Cone
Blank Cone
Posts: 24
Joined: 01 Sep 2011 16:43

streaming using RTP does not detect a connection loess

Postby captainst » 01 Sep 2011 17:15

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!

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

Re: streaming using RTP does not detect a connection loess

Postby Rémi Denis-Courmont » 01 Sep 2011 22:14

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

captainst
Blank Cone
Blank Cone
Posts: 24
Joined: 01 Sep 2011 16:43

Re: streaming using RTP does not detect a connection loess

Postby captainst » 02 Sep 2011 05:11

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!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests