Postby DonMcL » 10 Jul 2017 21:50
Sorry for the late follow-up. I've been working on other things.
1) Please explain "With that said, RTCP is mostly useless if you mux as MPEG-TS." (I'm really just using the RTCP NTP timestamp and txTs, and RTCP txTs to gather packet level stats.)
2) I am currently using the following command to send an mp4 video: vlc -vvv long*.mp4 --sout '#rtp{mux=ts,dst=DEST.IP.ADDRESS,sdp=sap,name="TestStream"}'
On the receiving host I am receiving and playing the video with: vlc -vvv rtp://
The 2 hosts are connected via Ethernet network, and latency is very low.
This works fine.
On the receiving host I am using libpcap to capture the RTP and RTCP packets. I am using the pcap packet capture receive timestamp, minus the RTCP NTP transmit timestamp to monitor the packet latency.
I am also using the RTP rx time - the last RTCP NTP time + (RTP presentation timestamp - RTCP presentation timestamp) to calculate the RTP packet latency. This tracks the RTCP latency from above.
I am also using the RTP sequence numbers to monitor packet loss, etc.
The "problem" is the calculated latency starts low (< 1 ms), and grows continuously to > 23 ms.
I do not believe this is a problem with clock syncronisation. The two hosts have their time syncronised using NTP, and while the program was reporting latency of 13 ms, ntpdate reported the host clocks were syncronised to within 96 microseconds and (if I'm reading it correctly) the path latency is .025 ms. So I don't believe the path between the 2 hosts is congested or the host system clocks have drifted that far apart. See below.
Question) Is there anything "funny" with the ntp timestamps inserted into the RTCP headers that could be causing these latency measurements to "walk" like this?
Thanks for any insight you can provide.
Don
C:\Users\don\workspace\vlcStats\Debug> ntpdate -b -u -
d 142.92.62.164
10 Jul 15:07:20 ntpdate[9184]: ntpdate 4.2.8p10@1.3728-o Mar 23 13:48:34 (UTC+01
:00) 2017 (1)
host found : dhcp-62-164.dgim.crc.ca
10 Jul 15:07:20 ntpdate[9184]: AdjustTokenPrivileges failed: Not all privileges
or groups referenced are assigned to the caller.
10 Jul 15:07:20 ntpdate[9184]: Raised to high priority class, realtime requires
Increase Scheduling Priority privilege (enabled with secpol.msc).
Looking for host 142.92.62.164 and service ntp
142.92.62.164 reversed to dhcp-62-164.dgim.crc.ca
transmit(142.92.62.164)
receive(142.92.62.164)
transmit(142.92.62.164)
receive(142.92.62.164)
transmit(142.92.62.164)
receive(142.92.62.164)
transmit(142.92.62.164)
receive(142.92.62.164)
server 142.92.62.164, port 123
stratum 2, precision -20, leap 00, trust 000
refid [142.92.62.164], delay 0.02556, dispersion 0.00002
transmitted 4, in filter 4
reference time: dd0e4b51.b871b3e7 Mon, Jul 10 2017 14:52:01.720
originate timestamp: dd0e4eef.01765636 Mon, Jul 10 2017 15:07:27.005
transmit timestamp: dd0e4eef.016bb2d7 Mon, Jul 10 2017 15:07:27.005
filter delay: 0.02556 0.02556 0.02556 0.02556
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000096 0.000117 0.000178 0.000135
0.000000 0.000000 0.000000 0.000000
delay 0.02556, dispersion 0.00002
offset 0.000096
10 Jul 15:07:27 ntpdate[9184]: step time server 142.92.62.164 offset 0.000096 sec