Subject: [AVT] Calculation of bit rate of a RTP stream from RTP timestamp

From: Gaurav Garg <[email-masked]>
Date: Thu, 11 May 2006 09:20:57 -0700 (PDT)

Dear All,

I have a query relating to RTP timestamp field in RTP
header and it's probable relation to the bit rate.

The scenario is like this. The sender sends an RTP
stream over a network. Is is possible to calculate the
bit rate of the stream by a network element by looking
at the RTP timestamp values and size of the stream?

I think that in case we have no Bi-directional frames,
the RTP timestamp would increase monotonically and
then using this value and the clock frequency along
with the size of the stream, the bit rate can be
calculated.

But, please tell me how can this approach be followed
in case there are bi-directional frames also present.

I assume that the network element does not have
information like frame rate of the encoded bit stream
already available with it.

Thanks a lot!
Kind Regards,
Gaurav

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
Audio/Video Transport Working Group
[email-masked]
https://www1.ietf.org/mailman/listinfo/avt

---

From: Magnus Westerlund <[email-masked]>
Date: Thu, 11 May 2006 18:55:54 +0200

Hi Gaurav,

I think this methods simplifies things to much. First of all only the 
bits/frame could be determined. This as the transport bit-rate can be 
quite different from the media one using transmission scheduling.

In addition for codecs for which RTP payload format that allows 
aggregation of ADU, the payload can contain data from different 
timestamps. To calculate this correctly would then require deep payload 
inspection to figure these things out.

Thus in generalized case this method does not work.

Cheers

Magnus

-- 

Magnus Westerlund

Multimedia Technologies, Ericsson Research EAB/TVA/A
----------------------------------------------------------------------
Ericsson AB                | Phone +46 8 4048287
Torshamsgatan 23           | Fax   +46 8 7575550
S-164 80 Stockholm, Sweden | mailto: [email-masked]

---

From: Gaurav Garg <[email-masked]>
Date: Thu, 11 May 2006 11:55:57 -0700 (PDT)

Dear Magnus,

Thanks for your quick reply!
This was helpful.

Just to clarify further. If I do not have a scenario 
with fragmentation units or aggregation units, can
this method be used to calculate bit rate even for
interpolated MPEG frames ( which use Bi-directional
frames)?

IF the transmission order is same as the sampling
order, then this problem becomes very simple and I
believe the bit rate can be calculated in a straight
forward manner. But what happens when this is not
true?

Thanks!!
Gaurav

--- Magnus Westerlund <[email-masked]>

---

From: Magnus Westerlund <[email-masked]>
Date: Fri, 12 May 2006 10:03:22 +0200

> interpolated MPEG frames ( which use Bi-directional

I think you can in some sense calculate the media bit-rate using this 
method.

> forward manner. But what happens when this is not

The problem to correctly calculate the transmission bit-rate is not in 
the transmission order, rather the transmission timing. You do need to 
the transmission times for each individual packet to correctly calculate 
that.

Cheers

Magnus Westerlund