[Live-devel] Questions about project to dump Images frames from H264 stream using live555 and ffmpeg

Ross Finlayson finlayson at live555.com
Mon Mar 5 11:10:51 PST 2012


> 1. What is the exact nature of the data in the receive buffer at the time that the afterGettingFrame() method of the MediaSink subclass is called, when an H.264 stream from RTSP is in play? 

It's a H.264 NAL unit.


> 2. When an H.264 stream from RTSP is in play, is there any massaging of data in the receive buffer that needs to take place prior to decoding an H.264 frame in ffmpeg? Does it need a start code

Yes, you will need to prepend 0x00 0x00 0x00 0x01 to each NAL unit before passing it to "ffmpeg" for decoding.

You should also take the SDP 'configuration' string (from "MediaSubsession::fmtp_spropparametersets()"), and parse this string into a set of SPS and PPS NAL units, using the function "parseSPropParameterSets()".  You should then insert these NAL units (with start codes) into your decoder (before the NAL units that come from the RTP stream).


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/20120305/894b6a9f/attachment.html>


More information about the live-devel mailing list