Measure YouTube player's FPS performance












0















I would like to measure the performance of a YouTube video, for example the frame rate. There is an option on YouTube called "Stats for nerds", which displays the connection speed as well as buffer health and dropped frames besides some other interesting stuff – but not the current frames per second.



Is there any way to measure the current frames per second? By fps I don't mean the fps of the video itself, but the fps which the video player manages to display.



Also the measurement of the latency would be nice to know.










share|improve this question

























  • Isn't that just video FPS minus "dropped frames"?

    – grawity
    Jan 11 at 8:08











  • @grawity You don't even have to know the video FPS, since both decoded and dropped frames are exposed by WebKit.

    – slhck
    Jan 11 at 8:18











  • @slhck: I was referring to the counter already shown in "Stats for nerds".

    – grawity
    Jan 11 at 8:22
















0















I would like to measure the performance of a YouTube video, for example the frame rate. There is an option on YouTube called "Stats for nerds", which displays the connection speed as well as buffer health and dropped frames besides some other interesting stuff – but not the current frames per second.



Is there any way to measure the current frames per second? By fps I don't mean the fps of the video itself, but the fps which the video player manages to display.



Also the measurement of the latency would be nice to know.










share|improve this question

























  • Isn't that just video FPS minus "dropped frames"?

    – grawity
    Jan 11 at 8:08











  • @grawity You don't even have to know the video FPS, since both decoded and dropped frames are exposed by WebKit.

    – slhck
    Jan 11 at 8:18











  • @slhck: I was referring to the counter already shown in "Stats for nerds".

    – grawity
    Jan 11 at 8:22














0












0








0








I would like to measure the performance of a YouTube video, for example the frame rate. There is an option on YouTube called "Stats for nerds", which displays the connection speed as well as buffer health and dropped frames besides some other interesting stuff – but not the current frames per second.



Is there any way to measure the current frames per second? By fps I don't mean the fps of the video itself, but the fps which the video player manages to display.



Also the measurement of the latency would be nice to know.










share|improve this question
















I would like to measure the performance of a YouTube video, for example the frame rate. There is an option on YouTube called "Stats for nerds", which displays the connection speed as well as buffer health and dropped frames besides some other interesting stuff – but not the current frames per second.



Is there any way to measure the current frames per second? By fps I don't mean the fps of the video itself, but the fps which the video player manages to display.



Also the measurement of the latency would be nice to know.







windows-10 performance youtube video-playback






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 11 at 8:14







solid

















asked Jan 11 at 7:57









solidsolid

31




31













  • Isn't that just video FPS minus "dropped frames"?

    – grawity
    Jan 11 at 8:08











  • @grawity You don't even have to know the video FPS, since both decoded and dropped frames are exposed by WebKit.

    – slhck
    Jan 11 at 8:18











  • @slhck: I was referring to the counter already shown in "Stats for nerds".

    – grawity
    Jan 11 at 8:22



















  • Isn't that just video FPS minus "dropped frames"?

    – grawity
    Jan 11 at 8:08











  • @grawity You don't even have to know the video FPS, since both decoded and dropped frames are exposed by WebKit.

    – slhck
    Jan 11 at 8:18











  • @slhck: I was referring to the counter already shown in "Stats for nerds".

    – grawity
    Jan 11 at 8:22

















Isn't that just video FPS minus "dropped frames"?

– grawity
Jan 11 at 8:08





Isn't that just video FPS minus "dropped frames"?

– grawity
Jan 11 at 8:08













@grawity You don't even have to know the video FPS, since both decoded and dropped frames are exposed by WebKit.

– slhck
Jan 11 at 8:18





@grawity You don't even have to know the video FPS, since both decoded and dropped frames are exposed by WebKit.

– slhck
Jan 11 at 8:18













@slhck: I was referring to the counter already shown in "Stats for nerds".

– grawity
Jan 11 at 8:22





@slhck: I was referring to the counter already shown in "Stats for nerds".

– grawity
Jan 11 at 8:22










1 Answer
1






active

oldest

votes


















0














For WebKit, there are two video element attributes that you can query regularly:




  • webkitDecodedFrames

  • webkitDroppedFrames


More explanation here.



Using these, you can, for example, run a timer every second to get the values and calculate the real framerate. The two values should sum up to the total frames available in the video per played out second. Bear in mind that:




  • You have to pause counting if the video is not playing

  • Javascript timers are not very accurate

  • These attributes are vendor-specific and may be removed at some point


You could have a look at some example code that implements these metrics and calculates a mean played FPS — all you'd have to do is slightly rewrite that for pasting into the Chrome devtools console on YouTube.






share|improve this answer
























  • Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

    – solid
    Jan 11 at 11:01













  • The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

    – slhck
    Jan 11 at 11:26











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393067%2fmeasure-youtube-players-fps-performance%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














For WebKit, there are two video element attributes that you can query regularly:




  • webkitDecodedFrames

  • webkitDroppedFrames


More explanation here.



Using these, you can, for example, run a timer every second to get the values and calculate the real framerate. The two values should sum up to the total frames available in the video per played out second. Bear in mind that:




  • You have to pause counting if the video is not playing

  • Javascript timers are not very accurate

  • These attributes are vendor-specific and may be removed at some point


You could have a look at some example code that implements these metrics and calculates a mean played FPS — all you'd have to do is slightly rewrite that for pasting into the Chrome devtools console on YouTube.






share|improve this answer
























  • Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

    – solid
    Jan 11 at 11:01













  • The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

    – slhck
    Jan 11 at 11:26
















0














For WebKit, there are two video element attributes that you can query regularly:




  • webkitDecodedFrames

  • webkitDroppedFrames


More explanation here.



Using these, you can, for example, run a timer every second to get the values and calculate the real framerate. The two values should sum up to the total frames available in the video per played out second. Bear in mind that:




  • You have to pause counting if the video is not playing

  • Javascript timers are not very accurate

  • These attributes are vendor-specific and may be removed at some point


You could have a look at some example code that implements these metrics and calculates a mean played FPS — all you'd have to do is slightly rewrite that for pasting into the Chrome devtools console on YouTube.






share|improve this answer
























  • Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

    – solid
    Jan 11 at 11:01













  • The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

    – slhck
    Jan 11 at 11:26














0












0








0







For WebKit, there are two video element attributes that you can query regularly:




  • webkitDecodedFrames

  • webkitDroppedFrames


More explanation here.



Using these, you can, for example, run a timer every second to get the values and calculate the real framerate. The two values should sum up to the total frames available in the video per played out second. Bear in mind that:




  • You have to pause counting if the video is not playing

  • Javascript timers are not very accurate

  • These attributes are vendor-specific and may be removed at some point


You could have a look at some example code that implements these metrics and calculates a mean played FPS — all you'd have to do is slightly rewrite that for pasting into the Chrome devtools console on YouTube.






share|improve this answer













For WebKit, there are two video element attributes that you can query regularly:




  • webkitDecodedFrames

  • webkitDroppedFrames


More explanation here.



Using these, you can, for example, run a timer every second to get the values and calculate the real framerate. The two values should sum up to the total frames available in the video per played out second. Bear in mind that:




  • You have to pause counting if the video is not playing

  • Javascript timers are not very accurate

  • These attributes are vendor-specific and may be removed at some point


You could have a look at some example code that implements these metrics and calculates a mean played FPS — all you'd have to do is slightly rewrite that for pasting into the Chrome devtools console on YouTube.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 11 at 8:17









slhckslhck

161k47447470




161k47447470













  • Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

    – solid
    Jan 11 at 11:01













  • The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

    – slhck
    Jan 11 at 11:26



















  • Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

    – solid
    Jan 11 at 11:01













  • The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

    – slhck
    Jan 11 at 11:26

















Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

– solid
Jan 11 at 11:01







Hi slhck,thanks for your answer. Unfortunately the example code doesn't work for me. The video won't start playing.

– solid
Jan 11 at 11:01















The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

– slhck
Jan 11 at 11:26





The video doesn't exist anymore at this URL. It's just an example which has to be adapted to run on YouTube itself.

– slhck
Jan 11 at 11:26


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1393067%2fmeasure-youtube-players-fps-performance%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Сан-Квентин

8-я гвардейская общевойсковая армия

Алькесар