Python: count time of watching video
<p>I have a task, connected with detection time of watching video.
If I watch the video, for example <code>https://www.youtube.com/watch?v=jkaMiaRLgvY</code>, is it real to get quantity of seconds, which passed from the moment you press the button to start and until stop?</p>

<p>If what you are measuring is the total time the <strong>user</strong> spent watching the video (including stalls/interruptions) then your strategy would work. </p>

<p>However, if you are looking to measure the video duration, then simply counting the number of seconds since "start" was pressed isn't very accurate. While your wall clock is still running, the video playback could jitter or even stall for a number of reasons.</p>

<ul>
<li>Slow network (buffering)</li>
<li>Decoding/rendering delay. For instance, if you are trying to play a high-resolution video on a low-end device.</li>
<li>Probably many other...</li>
</ul>

python video youtube video-streaming