[Live-devel] QoS with openRTSP and Jitter output
David Wendel
dwen at telefonica.de
Thu May 24 08:09:13 PDT 2007
Hello List,
in my "IPTV QoS Monitoring" project i've tried to use openRTSP to get
QoS information for a particular stream. The output of jitter as a QoS
parameter is also interesting for me, so I'v extended the openRTSP code
to output this information. My question is, if I did it the right way,
because the jitter value I get, seems to be strange to me. So here is
the way I did it, I'v modified the 'live/testProgs/playCommon.cpp' by
adding two lines after the line number 1128 and 1142, see below:
1126 #ifdef SUPPORT_REAL_RTSP
1127 if (session->isRealNetworksRDT) {
1128 RealRDTSource* rdt = (RealRDTSource*)src;
1129 *env << "jit_ms\t" << rdt->jitter()/1000.0 << "\n";
1130 *env << "ipg_ms_min\t" <<
rdt->minInterPacketGapUS()/1000.0 << "\n";
1131 struct timeval totalGaps = rdt->totalInterPacketGaps();
1132 double totalGapsMS = totalGaps.tv_sec*1000.0 +
totalGaps.tv_usec/1000.0;
1133 unsigned totNumPacketsReceived =
rdt->totNumPacketsReceived();
1134 *env << "ipg_ms_avg\t"
1135 << (totNumPacketsReceived == 0 ? 0.0 :
totalGapsMS/totNumPacketsReceived) << "\n";
1136 *env << "ipg_ms_max\t" <<
rdt->maxInterPacketGapUS()/1000.0 << "\n";
1137 } else {
1138 #endif
1139 RTPReceptionStatsDB::Iterator
statsIter(src->receptionStatsDB());
1140 // Assume that there's only one SSRC source (usually
the case):
1141 RTPReceptionStats* stats = statsIter.next(True);
1142 if (stats != NULL) {
1143 *env << "jit_ms\t" << stats->jitter()/1000.0 << "\n";
1144 *env << "ipg_ms_min\t" <<
stats->minInterPacketGapUS()/1000.0 << "\n";
1145 struct timeval totalGaps =
stats->totalInterPacketGaps();
1146 double totalGapsMS = totalGaps.tv_sec*1000.0 +
totalGaps.tv_usec/1000.0;
1147 unsigned totNumPacketsReceived =
stats->totNumPacketsReceived();
1148 *env << "ipg_ms_avg\t"
1149 << (totNumPacketsReceived == 0 ? 0.0 :
totalGapsMS/totNumPacketsReceived) << "\n";
1150 *env << "ipg_ms_max\t" <<
stats->maxInterPacketGapUS()/1000.0 << "\n";
1151 }
1152 #ifdef SUPPORT_REAL_RTSP
1153 }
1154 #endif
Here is an output example I get vor video and audio separatly:
[24.05.2007 14:36:25]: Created receiver for "video/X-ASF-PF" subsession
(client ports 1046-1047)
[24.05.2007 14:36:25]: Setup "video/X-ASF-PF" subsession (client ports
1046-1047)
[24.05.2007 14:36:25]: Outputting data from the "video/X-ASF-PF"
subsession to 'stdout'
[24.05.2007 14:36:25]: Started playing session
[24.05.2007 14:36:25]: Receiving streamed data (for up to 25.000000
seconds)...
[24.05.2007 14:36:25]: Data packets have begun arriving [1180017360988]
[24.05.2007 14:36:25]: begin_QOS_statistics
[24.05.2007 14:36:25]: server_availability 100
[24.05.2007 14:36:25]: stream_availability 100
[24.05.2007 14:36:25]: subsession video/X-ASF-PF
[24.05.2007 14:36:25]: num_packets_received 564
[24.05.2007 14:36:25]: num_packets_lost 0
[24.05.2007 14:36:25]: sdur_sec 25.007102
[24.05.2007 14:36:25]: trans_kB_tot 4110.460000
[24.05.2007 14:36:25]: measurement_sampling_interval_ms 100
[24.05.2007 14:36:25]: kbps_min 0.000000
[24.05.2007 14:36:25]: kbps_avg 1314.973642
[24.05.2007 14:36:25]: kbps_max 4294.319547
[24.05.2007 14:36:25]: loss_percent_min 0.000000
[24.05.2007 14:36:25]: loss_percent_avg 0.000000
[24.05.2007 14:36:25]: loss_percent_max 0.000000
[24.05.2007 14:36:25]: jit_ms 0.064000
[24.05.2007 14:36:25]: ipg_ms_min 0.053000
[24.05.2007 14:36:25]: ipg_ms_avg 43.969628
[24.05.2007 14:36:25]: ipg_ms_max 735.418000
[24.05.2007 14:36:25]: end_QOS_statistics
[24.05.2007 14:36:25]: Created receiver for "audio/X-ASF-PF" subsession
(client ports 1048-1049)
[24.05.2007 14:36:25]: Ignoring "application/X-WMS-RTX" subsession,
because we've asked to receive a single audio session only
[24.05.2007 14:36:25]: Ignoring "video/X-ASF-PF" subsession, because
we've asked to receive a single audio session only
[24.05.2007 14:36:25]: Setup "audio/X-ASF-PF" subsession (client ports
1048-1049)
[24.05.2007 14:36:25]: Outputting data from the "audio/X-ASF-PF"
subsession to 'stdout'
[24.05.2007 14:36:25]: Started playing session
[24.05.2007 14:36:25]: Receiving streamed data (for up to 25.000000
seconds)...
[24.05.2007 14:36:25]: Data packets have begun arriving [1180017361008]
[24.05.2007 14:36:25]: begin_QOS_statistics
[24.05.2007 14:36:25]: server_availability 100
[24.05.2007 14:36:25]: stream_availability 100
[24.05.2007 14:36:25]: subsession audio/X-ASF-PF
[24.05.2007 14:36:25]: num_packets_received 136
[24.05.2007 14:36:25]: num_packets_lost 0
[24.05.2007 14:36:25]: sdur_sec 25.034147
[24.05.2007 14:36:25]: trans_kB_tot 409.088000
[24.05.2007 14:36:25]: measurement_sampling_interval_ms 100
[24.05.2007 14:36:25]: kbps_min 0.000000
[24.05.2007 14:36:25]: kbps_avg 130.729599
[24.05.2007 14:36:25]: kbps_max 1443.854439
[24.05.2007 14:36:25]: loss_percent_min 0.000000
[24.05.2007 14:36:25]: loss_percent_avg 0.000000
[24.05.2007 14:36:25]: loss_percent_max 0.000000
[24.05.2007 14:36:25]: jit_ms 0.252000
[24.05.2007 14:36:25]: ipg_ms_min 0.155000
[24.05.2007 14:36:25]: ipg_ms_avg 177.394507
[24.05.2007 14:36:25]: ipg_ms_max 1123.697000
[24.05.2007 14:36:25]: end_QOS_statistics
Thanx for your help in advance,
David Wendel.
More information about the live-devel
mailing list