Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMCD mtp field is not sent as an aggregated throughput value #3740

Open
5 tasks done
mgreve-akamai opened this issue Aug 25, 2021 · 5 comments
Open
5 tasks done

CMCD mtp field is not sent as an aggregated throughput value #3740

mgreve-akamai opened this issue Aug 25, 2021 · 5 comments
Assignees
Milestone

Comments

@mgreve-akamai
Copy link

Environment
Steps to reproduce

Play the stream on the CMCD sample page: https://reference.dashif.org/dash.js/nightly/samples/advanced/cmcd.html

Observed behavior

There are two "independent" values of the mtp field sent when playing back the stream on the page above. We observe one value for audio and one for video, and there's generally a large absolute difference between the two. Here's a snippet from the textarea on the page with the mtp values highlighted:

type: video
file: bbb_30fps_3840x2160_12000k_14.m4v
bl : 52000
br : 14931
cid : 21cf726cfe3d937b5f974f72bb5bd06a
d : 4000
dl : 52000
mtp : 168000
nor : /akamai/bbb_30fps/bbb_30fps_3840x2160_12000k/bbb_30fps_3840x2160_12000k_15.m4v
ot : v
rtp : 5800
sf : d
sid : b248658d-1d1a-4039-91d0-8c08ba597da5
st : v
tb : 14932
v : 1

type: video
file: bbb_30fps_3840x2160_12000k_15.m4v
bl : 56000
br : 14931
cid : 21cf726cfe3d937b5f974f72bb5bd06a
d : 4000
dl : 56000
mtp : 171600
nor : /akamai/bbb_30fps/bbb_30fps_3840x2160_12000k/bbb_30fps_3840x2160_12000k_16.m4v
ot : v
rtp : 5400
sf : d
sid : b248658d-1d1a-4039-91d0-8c08ba597da5
st : v
tb : 14932
v : 1

type: audio
file: bbb_a64k_14.m4a
bl : 52100
br : 67
cid : 21cf726cfe3d937b5f974f72bb5bd06a
d : 4011
dl : 52100
mtp : 1500
nor : /akamai/bbb_30fps/bbb_a64k/bbb_a64k_15.m4a
ot : a
rtp : 100
sf : d
sid : b248658d-1d1a-4039-91d0-8c08ba597da5
st : v
tb : 67
v : 1

The general pattern is that the mtp value (measured throughput) is very low for audio, and very high for video.

Link to CMCD spec: https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf

Console output

Irrelevant

Expected behavior

According to the spec, the mtp field should be an aggregate throughput value. Hence we shouldn't have two wildly alternating values as observed on the page above. For reference, this is what the CMCD spec says:

"The throughput between client and server, as
measured by the client and MUST be rounded to
the nearest 100 kbps. This value, however derived,
SHOULD be the value that the client is using to
make its next Adaptive Bitrate switching decision.
If the client is connected to multiple servers
concurrently, it must take care to report only the
throughput measured against the receiving server.
If the client has multiple concurrent connections to
the server, then the intent is that this value
communicates the aggregate throughput the client
sees across all those connections. "

@dsilhavy dsilhavy self-assigned this Aug 25, 2021
@dsilhavy dsilhavy added this to the 4.1.0 milestone Aug 25, 2021
@dsilhavy
Copy link
Collaborator

dsilhavy commented Sep 3, 2021

I checked this and the low values for audio are related to the throughput estimation. We define a certain threshold (for audio it is 5ms) for which we assume that the segments are coming from the cache:

            cacheLoadThresholds: {
                video: 50,
                audio: 5
            },

With the sample stream I saw a lot of download time values below this threshold which is why they are not used for the throughput estimation.
On the other hands there are outliers, for instance an estimated download time of 1501ms for an audio segment.
If you check this in the Chrome network panel you can see that the actual download time was way lower.

Bildschirmfoto 2021-09-03 um 15 32 39

If the data is transferred in a single data burst there is no progress event the player could use to get the approximate start time of the data transfer.

In summary, the throughput estimation for audio (at least with this particular stream) looks buggy. However, with the values we get from the XHR request there might not be a better solution. What looks promising is this API: https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API . It gives us the responseStart and responseEnd values. In order to be able to use it on the client side the server needs to set Timing-Allow-Origin headers for clients doing cross origin requests. Otherwise the value for responseStart will always be 0.

I will come back to this issue once I start looking into the throughput estimation in dash.js.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Sep 9, 2021

@wilaw added the Timing-Allow-Origin: * which allows for checking the Resource Timing API

@dsilhavy dsilhavy modified the milestones: 4.1.0, 4.1.1 Sep 15, 2021
@dsilhavy dsilhavy modified the milestones: 4.1.1, 4.2.0 Nov 10, 2021
@dsilhavy dsilhavy modified the milestones: 4.2.1, 4.3.0 Dec 8, 2021
@dsilhavy dsilhavy modified the milestones: 4.3.0, 4.3.1 Feb 14, 2022
@dsilhavy dsilhavy modified the milestones: 4.4.0, 4.4.1 Apr 14, 2022
@dsilhavy dsilhavy modified the milestones: 4.4.1, 4.5.0 May 10, 2022
@dsilhavy dsilhavy removed this from the 4.5.0 milestone Sep 20, 2022
@stale
Copy link

stale bot commented Feb 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. However, it might still be relevant so please leave a short comment if it should remain open. Otherwise the issue will be closed automatically after two weeks. Thank you for your contributions.

@stale stale bot added the stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed label Feb 17, 2023
@stale
Copy link

stale bot commented Mar 4, 2023

This issue has been automatically closed because no further activity occurred. If you think this issue is still relevant please reopen it or contact @dsilhavy. Thank you for your contributions.

@stale stale bot closed this as completed Mar 4, 2023
@dsilhavy dsilhavy reopened this Mar 4, 2023
@stale stale bot removed the stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed label Mar 4, 2023
@dsilhavy dsilhavy added this to the 5.0.0 milestone Nov 15, 2023
@dsilhavy
Copy link
Collaborator

Throughput values should be fixed in v.5.0, re-evaluate against https://reference.dashif.org/dash.js/v5/samples/dash-if-reference-player/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants