[FFmpeg-devel] drop entire frame when RTP packets are lost

Michael Niedermayer michaelni at gmx.at
Tue Jul 3 21:20:47 CEST 2012


On Mon, Jul 02, 2012 at 05:16:10PM -0400, Martin Carroll wrote:
> 
> > vlc --play-and-exit -vvv in.mpg --sout '#rtp{dst=127.0.0.1,port=1234,mux=ts,sdp=http://127.0.0.1:4321/test.sdp}'
> 
> I am also seeing corruption when I do the above.  What version of vlc are you running?  Also, have you tried streaming a video for a long time (using --loop instead of --play-and-exit)?  Corruption often does not start until a minute or so into the video.

thanks, i could reproduce the corruption
the problem is caused by the OS UDP buffer overflowing
this is because rtpproto.c disabled our ring buffer
without the ring buffer the code depends on the OS having large
enough buffers which it plain doesnt

To fix this you would have to do 2 things
first remove "url_add_option(buf, buf_size, "fifo_size=0");" from
rtpproto.c

and second make the rtp code actually work with the udp code with its
fifo, currently the rtp code hacks into the udp code and extracts
its fd and accesses this directly bypassing the fifo, which cannot
work

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120703/0f43797f/attachment.asc>


More information about the ffmpeg-devel mailing list