[Libav-user] seek on upd rtsp stream causes frame corruption (smearing); how to avoid or detect?

Trompowsky At trompowsky.at at gmail.com
Sun Nov 17 01:47:42 EET 2019


when you seek on a rtsp stream (with udp transport), it very often
causes a particular type of frame corruption where the image looks
smeared vertically, ie the lower part of the image shows vertical
strips (more precisely I[x,y] = C[x] for all y>y0, where y0 depends on
the i-frame).

for an example, see
http://ffmpeg.org/pipermail/libav-user/attachments/20131015/c4991bde/attachment.jpg

This issue has been reported in many places and the suggested
workaround is using `-rtsp_transport tcp`, however this workaround is
not good enough because it causes a significant additional latency.

* is there a way (eg cmd line or api options) to avoid such frame
corruptions in rtsp streams with UDP mode when doing a seek (seeking
to an I-frame)

* if not, is there a way to detect when a given frame has such
smearing corruptions `discardcorrupt` as was recommended does nothing
useful. Ideally, without having to decode packets.

To reproduce this smearing:
ffplay rtsp://...
wait 5 seconds
press `p` (pause)
wait 2 seconds
press `p` (play)
image shows the smearing artifact


More information about the Libav-user mailing list