[Live-devel] Starting Frames are corrupted

Vikram Singh vikram at vizexperts.com
Fri Jun 20 07:11:33 PDT 2014


Hi ross,

 

Just for testing purpose, I have reduced my streaming video size to 100*100
px size.

By reducing the size I want to avoid the scenario where on the client side
there is truncation of data, due to buffer overflow in the starting.

This buffer overflow was assumed because the client had no idea about server
frame size and initialized a default size to the buffer that receives data.

Even then I have the problem of corrupt frames in the starting.

 

Can there be any other case because of which this initial corruption of
frames is happening.

 

An another observation is when I had incorrect OutPacketBuffer::maxSize
initialized to it, the frame rendered were like this

https://drive.google.com/file/d/0B9yXmUZbfI7_OWJiblZta1hXYWM/edit?usp=sharin
g

 

From: live-devel [mailto:live-devel-bounces at ns.live555.com] On Behalf Of
Ross Finlayson
Sent: Wednesday, June 18, 2014 11:13 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Starting Frames are corrupted

 

I am having --  unsigned OutPacketBuffer::maxSize = 900000;  in
mediaSink.cpp

If I decrease the maxSize then the frames I get are truncated.

 

OK, there are two separate buffer sizes that you need to concern yourself
with.

 

"OutPacketBuffer::maxSize" is the buffer size that is used - by your server
- when *transmitting* NAL units.  You must set it to be at least as large as
your largest NAL unit.  Otherwise you will see (in 'stderr') error messages
about needing to increase "OutPacketBuffer::maxSize".

 

The receiving application - in your case VLC - must also have sufficient
buffer space to be able to reassemble the incoming RTP packets into a
complete NAL unit.  That is what I referred to in my previous email message.

 

In any case, 900000 bytes is an *insanely large* NAL unit (I-frame) size!!
A NAL unit this large will get fragmented into *60* RTP packets, and *all*
of these RTP packets must be received by the receiving application,
otherwise the entire frame will be unrenderable.  This is why it's much
better to reconfigure your encoder so that it breaks up large I-frames into
smaller 'slice' NAL units.

 





 Can you please specify how to decrease the nal unit size without decreasing
the value of maxSize.

 

You mean "how to decrease the nal unit size without *increasing* the value
of maxSize"?  Once again, you need to reconfigure your encoder to break up
large I-frames into smaller 'slice' NAL units.

 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/ 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140620/8cefa548/attachment.html>


More information about the live-devel mailing list