Page 1 of 1

Repeated frames from dead UDP stream

Posted: 03 Sep 2015 10:19
by adish
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

Re: Repeated frames from dead UDP stream

Posted: 03 Sep 2015 12:04
by RĂ©mi Denis-Courmont

Re: Repeated frames from dead UDP stream

Posted: 03 Sep 2015 13:55
by adish
Is there at least no warning or event that is generated for this case?

Re: Repeated frames from dead UDP stream

Posted: 03 Sep 2015 15:06
by adish
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?