How to measure brandwith consumption of an rtp stream?

dv dv at pseudoterminal.org
Tue Aug 7 06:26:59 PDT 2012


On 08/07/12 14:36, Markus wrote:
> Hi all,
>
> Can someone please tell me how i can measure the brandwith consumption of a
> rtp video stream between server and client?
>
>
> Thanks in advance
> Markus
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-measure-brandwith-consumption-of-an-rtp-stream-tp4655872.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

The minimum size of an RTP header is 12 byte. This means no CSRC 
identifiers and no extension headers. Other than that, the rest is just 
the payload. Depending on the actual payload size, this 12 byte overhead 
can be significant to minimal. Therefore, it is necessary to find out 
the packet size.

You can do this:
- a priori by estimating the packet size using the bitrate and frame 
rate (example: 128kbit/s, 30 Hz -> 128000 / 8 / 30 ~ 534 byte for the 
payload); this necessarily makes assumptions about the encoder, and you 
have to add the RTP overhead yourself
- or a posteriori using buffer probes that you can hook up right at the 
sink pad of the udpsink that is sending out the packets

I'd go the a posteriori way, since it makes no assumptions, and 
implicitely adds the RTP overhead to the measurements. Gather 
measurements over several seconds, and calculate the mean. It also makes 
for pretty graphs over time :)

However, the a priori option can additionally be used to verify that 
your bandwidth looks OK. (There are in fact statistical confidence 
interval tests for this very purpose.)


More information about the gstreamer-devel mailing list