[Live-devel] How framerate is passing to rtsp client

Ross Finlayson finlayson at live555.com
Fri Apr 1 08:55:42 PDT 2016


> I have compared logs from my rtsp server ( runned on embedded device) and rtsp client ( runned on PC) and I found difference in timestamps.

You mean “presentation time”, not “timestamp”.  (Once again, you do not need to concern yourself with RTP timestamps - at all.  Please don’t mention them again; that inevitably turns the discussion into a ‘rat hole’, and wastes my time.)


> On the server has elapsed 4.7 s

During which time you transmit 46 NAL units.  Which implies a frame rate of (46-1)/4.7 =~ 9.5 frames per second.  That seems about right.

> On the testRTSPClient has elapsed 1.6 s.

More accurately, the computed *presentation times” span 1.6s.  (I’m sure that the actual elapsed time is about 4.7s)

These symptoms suggest that your server is not computing presentation times properly.

But you haven’t said anything about specifically how you generate H.264 NAL units, and feed them to your “H264VideoRTPSink”.  I suspect that this is your real problem.

If you are generating ‘discrete’ H.264 NAL units - i.e., one at a time - then you must feed them into a “H264VideoStreamDiscreteFramer”, NOT a “H264VideoStreamFramer”.  Also, the H.264 NAL units that you feed into a “H264VideoStreamDiscreteFramer” MUST NOT begin with a 4-byte 0x00 0x00 0x00 0x01 ‘start code’.

(You use a “H264VideoStreamFramer” only if your video comes from an unstructured H.264 byte stream - e.g., from a file.  It parses the byte stream and computes its own “fPresentationTime” and “fDurationInMicroseconds”.  Therefore, it’s not what you want.)

Please send us your implementation of the “createNewStreamSource()” and “createNewRTPSink” virtual functions.  This may tell us what’s wrong.

Also:
> PIPE:LOS: Sending 4137 bytes with truncated 7685 bytes  Presentation time: 567993728.084010

What is this ‘truncation’?  This is something that you will need to fix.  Your “H264VideoStreamDiscreteFramer” object must be fed a complete, untruncated H.264 NAL unit.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list