Detecting when UDP stream has stopped

*nix specific usage questions
eccles42
Blank Cone
Blank Cone
Posts: 10
Joined: 20 Feb 2007 18:14
Location: UK

Detecting when UDP stream has stopped

Postby eccles42 » 16 Apr 2007 21:00

Hi,

At the moment I can stream a movie UDP unicast from one place to another, however, if the source stops, I get the last frame of the video displayed until there's more data.
Is there any way of specifying "If you haven't had any data for 5secs, go to black screen/no screen" or something?

Cheers

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

Postby Rémi Denis-Courmont » 21 Apr 2007 15:55

The raw UDP streaming method has no way to specify this. So, this is essentially impossible.

It could be do-able with RTP, but it's not implemented :(
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

eccles42
Blank Cone
Blank Cone
Posts: 10
Joined: 20 Feb 2007 18:14
Location: UK

Postby eccles42 » 21 Apr 2007 18:08

Hmmm, there should be a way to acheive the same result tho, even if it isn't in VLC.

I have an instance of VLC running all the time just listening to any UDP sent to it.

I can run a network monitor, either constantly or every 5 mins or so, that checks the network traffic, if there's no UDP, it runs VLC playing a small blank file to the other instance.
This should work as far as I can see, does anyone know of any suitable programs to do it?

Cheers

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

Postby Rémi Denis-Courmont » 22 Apr 2007 09:48

Well, you could concatenate a short silent audio-only stream right after the end of the actual stream on the sender side.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

adish
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Jun 2011 21:43

Re: Detecting when UDP stream has stopped

Postby adish » 21 Jun 2011 14:03

In fact, you can do it.
Use libvlc_event_attach to handle the libvlc_MediaPlayerTimeChanged event.
You will only get it if the stream is changing, so if you don't get it for, say, 1 second, it means something is wrong with the stream.
Good luck,
Adi


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests