I thought the point of the NAL units was to manage size.
The key frame is the only worry and it gets broken into slices.
On one camera that has higer resolution I get a stream of nals like this

[7][8][5][5][5][1][1][1][1]....

Where the 7 and 8 are the sps and pps and are very small and the 5's represent 
slices of the large keyframe. (the ones are the much smaller difference frames)

From: live-devel-boun...@ns.live555.com 
[mailto:live-devel-boun...@ns.live555.com] On Behalf Of Ross Finlayson
Sent: Thursday, December 01, 2011 7:13 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] StreamParser internal error (149999+ 4 >

Surely the answer is to test the frame-size from the encoder before passing it 
into Live555

Unfortunately not, because we don't know the frame size in advance; we can 
figure it out only by parsing/copying the data, looking for the next 'start 
code'.  And it's this that's overflowing our stream parsing code.

On reflection, however, I think I can fix our H.264 parsing code to avoid this 
problem (the fix would be for H.264 parsing only).

However, you also should reconsider generating such huge NAL units.  The 
problem with NAL units this size is that if you stream them, then each such NAL 
unit will get fragmented over multiple RTP packets.  That's OK, but the loss of 
just one of these packets will cause the entire NAL unit to be undecodable by 
the receiver.  And the larger the NAL unit, the more likely that that will 
happen.

If you have control over your encoder, it would be far better to have it 
generate such large frames as multiple 'slices' - i.e., one NAL unit per slice, 
rather than as one NAL unit for the whole frame.

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

________________________________
No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.1873 / Virus Database: 2102/4649 - Release Date: 11/30/11
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to