Repeated frames from dead UDP stream

This forum is about all development around libVLC.
adish
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Jun 2011 21:43

Repeated frames from dead UDP stream

Postby adish » 03 Sep 2015 10:19

Hi,

I'm reading a UDP video stream and extracting frames from it.
When my UDP stream dies, libVLC keeps sending the same frame over and over as if nothing special happens - as if it is continuously getting it on the stream (which is now empty).

I understand that you never know when a UDP stream is dead or back online, but any data already recieved should only be presented once.
The problem also manifests in VLC player.

To reproduce:

1. Stream a video file to UDP, e.g. like this: ffmpeg -i my-vid.mp4 -an -vcodec mpeg2video -f mpeg2video udp://@127.0.0.1:59001
2. Open and play the stream in VLC or extract the frames with libVLC
3. Kill ffmpeg

VLC will continue to re-deliver the last frame until the stream is resumed.

Is there a way to detect when this happens and if so how?

Thanks!
Adi

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

Re: Repeated frames from dead UDP stream

Postby Rémi Denis-Courmont » 03 Sep 2015 12:04

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: Repeated frames from dead UDP stream

Postby adish » 03 Sep 2015 13:55

Is there at least no warning or event that is generated for this case?

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

Re: Repeated frames from dead UDP stream

Postby adish » 03 Sep 2015 15:06

The bug ticket seems quite old and said to be hard to fix.
If it cannot be easily fixed, can't it at least generate an async event that can be caught and handled?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests