[Live-devel] How framerate is passing to rtsp client
Ross Finlayson
finlayson at live555.com
Mon Apr 4 09:54:29 PDT 2016
> My first NAL analyzed by bitstream analyzer.
>
> !! Found NAL at offset 4 (0x0004), size 18 (0x0012)
> XX 00 00 00 01 67 42 80 1E 95 A0 50 7C 84 00 00 0F
>
> ==================== NAL ====================
> forbidden_zero_bit : 0
> nal_ref_idc : 3
> nal_unit_type : 7 ( Sequence parameter set )
> ======= SPS =======
> profile_idc : 66
> constraint_set0_flag : 1
> .
> .
> .
>
> It is not discrete NAL unit.
OK, let me explain this a different way:
You want to control the rate at which you transmit NAL units. I.e., you want to set “fPresentationTime” explicitly, and transmit NAL units at a rate that you choose (about 9 frames per second).
THEREFORE, you MUST use a “H264VideoStreamDiscreteFramer” to do this. You CANNOT use a “H264VideoStreamFramer”.
The reason for this is that a “H264VideoStreamFramer” parses the H.264 video byte stream itself, and sets “fPresentationTime” (and “fDurationInMicroseconds”) ITSELF, based on the timing information (frame rate) that it deduces from the H.264 video byte stream that it is being fed. In your case, this deduced frame rate is NOT ~9 frames per second. Instead, it is 25 frames per second, I think.
Once again, because you want to set “fPresentationTime” yourself, and explicitly control the rate at which you transmit NAL units, you MUST use a “H264VideoStreamDiscreteFramer”. This means that you will have to do your own parsing of your H.264 video data, and feed the NAL units - one at a time, and WITHOUT a 0x00 0x00 0x00 0x01 ‘start code’ - to your “H264VideoStreamDiscreteFramer”.
(Unfortunately, we’ve probably now reached the limit for how much assistance I can provide you ‘for free’ on this mailing list. If your company is interested in having me consult further on your project, then please have your management let me know (via separate email).)
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list