[Live-devel] H264VideoStreamDiscreteFramer problems

Ross Finlayson finlayson at live555.com
Wed Jan 4 14:07:58 PST 2012


> I’m having problems getting a valid stream out of my live video server now I have switched to using the H264VideoStreamDiscreteFramer. I was using H264VideoStreamFramer but I couldn’t avoid frame truncation problems.
>  
> I-Frames from my encoder look like this
> 00 00 00 01 27 42 00 32
> 8b 68 02 18 0f 33 02 48
> 04 00 00 00 01 28 ce 05
> 0a c8 00 00 00 01 25 b8....................
> So I send these frames in three parts, removing the 00 00 00 01 headers, copying the rest of the NALU bytes to the fTo buffer and then calling FramedSource::afterGetting(this);
> So, in the above example I send:-
> The first part, the SPS, 13 bytes 27 42 00 32 8b 68 02 18 0f 33 02 48 04
> Then the PPS, 5 bytes 28 ce 05 0a c8
> Then the frame bytes, 25 b8 etc.

Are you setting "fFrameSize" correctly in your 'frame source' class, before you call "FramedSource::afterGetting(this)"?  (Remember to *not* count the four header bytes, because you stripped those off.)

You can verify that things are working OK by checking the "nal_unit_type" that's extracted in each call to "H264VideoStreamDiscreteFramer::afterGettingFrame1()" (see "liveMedia/H264VideoStreamDiscreteFramer.cpp", lines 67-73).  In your example data, "nal_unit_type" in the first call should be 7 (the SPS); in the second call, 8 (the PPS); and in the third call 5.


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/20120104/878d1013/attachment-0001.html>


More information about the live-devel mailing list