3

I'll try to make myself as clear as possible. I am streaming a video and I'd like to know for each time t in the video, the no. of bytes that should have been loaded in client's machine to play the video from start to time t. I want this info as an array(or some similar data structure) for various values of t

I'm trying to achieve this with the help of youtube api but I'm facing some problems. What I did was to load the video from a time and call getVideoStartBytes. It seems correct seeing the youtube api's documentation but the final graph is weird. It looks like a parabola! It's weird because no. of bytes needed at time 25 can't be less than the no. of bytes needed at time 15.

enter image description here Earlier I have done bitrate calculation using vlc and the graph comes something like y=x^2 which was at least plausible.

Is this some kind of bug in youtube or maybe something else? Please help.

prongs
  • 9,422
  • 21
  • 67
  • 105
  • 1
    i have the same problem. Please post solution here if you find anything. – ConfusedAboutCPP Feb 27 '12 at 14:58
  • Are you saying getVideoStartBytes is not monotonically increasing with the start time? That doesn't sound right (but wouldn't be the first YT oddity). There's lots of ways to look into this, so maybe you should show some code and the video ID that you're looking at. – mjhm Feb 27 '12 at 17:29
  • @mjhm well, the code is quite complex, it's django project and the code is split up into layers and I fear even if I paste the code here, it wouldn't be easy to understand. But yeah, that's exactly I'm saying, it should be monotonically increasing! The video id is `-UpmQN55q2g` – prongs Feb 28 '12 at 10:32
  • 1
    I don't know about youtube, but usually you can send more over the network than you actually can play in the same time period, so a smart player will send as much as possible and then throttle itself. Maybe this is what you are seeing. The bytes aren't related to time T, they encompass more than the total time. – devshorts Sep 19 '12 at 17:05

0 Answers0