[Live-devel] Decoding H264 non-IDR picture

Ross Finlayson finlayson at live555.com
Fri Jun 20 06:45:38 PDT 2014


> I am trying to implement decoding of H264 NAL units that are received from the camera (using live555 rtsp streaming). Everything works fine if received NAL unit is IDR (see part of the code in PS) but it does not work for SLICE NAL unit (nal_unit_type == 1). To decode image this NAL unit is not enough on its own and reference needs to be made to all the units since last IDR unit (key frame with nal_unit_type == 5). I do not know how to implement this.

Our software does not do any decoding or other processing on the H.264 NAL units that it transmits/receives via RTP (except that it automatically fragments/defragments large NAL units so that they will fit in RTP packets).  It just delivers a sequence of NAL units - the same as if it came directly from the encoder.


>  How to combine last IDR unit with the following SLICE NAL units  to produce H264 frame before sending it to the decoder?

Someone on this mailing list might know the answer to your question, but, generally speaking, questions about how to implement the decoding of received NAL units are outside the scope of this mailing list (because the "LIVE555 Streaming Media" software doesn't do any decoding).

What happens, however, when you try playing your stream using a media player, such as VLC?  If VLC is able to play the stream OK, then you could look at its source code (though ti probably just uses FFMPEG or something for decoding).


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/baa55452/attachment-0001.html>


More information about the live-devel mailing list