Youtube Playback

I just have a question. I can play a video in youtube and some of the higher definition ones will play but kind of hesitate ever few seconds. It’s not too bad and is way better than it was years ago. However, if I download that same video and play it locally. It plays very smooth. So, I know my hardware can handle it, I know that Haiku can handle it. I’m just curious as to what the difference in playing a video in Webpositive is different from locally. It only seems to be videos of 1080p or higher. Again, it isn’t too, too bad and much better than years ago. Just curious as to what is happening.

1 Like

I have observed the same and I would be very interested in some hint too.

The code to play videos in Web+ is a quick hack I threw together to get things started, hoping someone more knowlegeable with the media kit would join and do the right thing. No one has.

  • It does not use the media nodes buffering facilities to decode things in advance
  • A lot of it runs in lockstep with other parts of the browser engine, so it can easily be blocked waiting for some javascript code to run
  • The decoded bitmap with the decoded video frames may be copied from one offscreen buffer to another several time, wasting CPU
  • No attempt is done to optimize scaling the video to the correct size for displaying, I don’t know how efficient the existing scaling code is

So, someone just has to write the actual code to do this.

4 Likes

Thanks PulkoMandy. I was just curious. So, it just really boils down to the code in Web+ not really being optimized. I do hope someone is able to get to this before R1. But it does work much better than it did the last time I tried it out. So, thanks for making it work.

1 Like