[Live-devel] how to make latency as low as possible

Ross Finlayson finlayson at live555.com
Fri Jan 13 07:52:29 PST 2017


> For the start code, I have eleminated them all. My camera's working pattern is like this, when encoding key frame, it outputs SC+SPS+SC+PPS+SC+Frame, when encoding non-key frame, it outputs SC+Frame. So, after I eleminated the SC, what I sent to the sink object is SPS+PPS+FRAME for key frame, and FRAME alone for non-key frame.
> 
> Did I missed something here?

Yes, you missed the part where I said that:
	each ‘frame’ that come from your input source must be a ***single*** H.264 NAL unit, and MUST NOT be prepended by a 0x00 0x00 0x00 0x01 ‘start code’.

So, you must deliver (without a prepended ‘start code’ in each case):
	SPS, then
	PPS, then
	FRAME, etc.

***provided that*** FRAME is a single NAL unit.  If, instead, FRAME consists of multiple ‘slice’ NAL units (this is actually preferred for streaming, because it’s much more tolerant of network packet loss), then you must deliver each ‘slice’ NAL unit individually (again, without a ‘start code’).

Also, when testing your server, I suggest first using “openRTSP” <http://www.live555.com/openRTSP/> as a client, before using VLC.


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




More information about the live-devel mailing list