[Live-devel] Receive H264 packets from GStreamer

Ross Finlayson finlayson at live555.com
Tue Sep 30 08:08:46 PDT 2014


>     I want to receive H264 video frame over RTP from a GStreamer server. I use H264VideoRTPSource which works fine, I receive all RTP packets.
>  
> But rtph264pay GStreamer's component which generate H264 payload send only One NAL Unit per RTP packet. Is there a way to rebuild the whole video frame at Live 555 side.

It's the job of the decoder to figure out how to render the incoming NAL units - which includes deciding when one video frame (called an 'access unit' in H.264 parlance) ends, and the next one begins.

However, as a hint, you can use the value of the RTP packet's 'M' (i.e., 'marker') bit, which is (supposed to be) set for the last RTP packet of an 'access unit' (i.e., video frame).  I.e., you can call "RTPSource::curPacketMarkerBit()" to test this.  Note, though, that this is only a hint, because this last RTP packet may have been lost (or the server might not have properly set the 'M' bit in the first place).

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/20140930/bc1d20d1/attachment.html>


More information about the live-devel mailing list