[Live-devel] H.264 RTP Marker Bit

Ross Finlayson finlayson at live555.com
Tue Mar 31 22:05:21 PDT 2015


Yes, you’ve stumbled upon a problem with the way that RTP payload formats for video codecs are defined: They mandate that the RTP ‘M’ bit be set for the last RTP packet of a ‘picture’, but often it’s non-trivial for a streaming application (like ours) to figure out exactly when this should be done.  That’s why the “H264or5VideoStreamDiscreteFramer” code sets “fPictureEndMarker” liberally (based on whether the NAL unit is VLC) - but, as you noted, this is the wrong thing to be doing for all but the last slice of a picture.

Fortunately, however, there is a way for you to overcome this (in a subclass of “H264or5VideoStreamDiscreteFramer”): Simply define your own ‘after getting’ function that first calls “H264or5VideoStreamDiscreteFramer::afterGettingFrame1()”, and then sets “pictureEndMarker()” to the ‘correct’ value.  (Then, the RTP packetizing code will do the right thing with the RTP ‘M’ bit.)

Note that the "pictureEndMarker()” member function is defined as
	Boolean& pictureEndMarker()
so it can appear on the left side of an assignment statement.

You should be able to do this without any changes to the existing LIVE555 code.


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/20150331/2a043f77/attachment.html>


More information about the live-devel mailing list