Closed Bug 571000 Opened 15 years ago Closed 14 years ago

Playing WebM videos on youtube is slow

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ehsan.akhgari, Unassigned)

Details

(Keywords: perf)

Attachments

(1 file)

This seems to be the case because we're inefficient in resizing videos, which is what youtube does, at least for their 720p videos.
Blocks: 571001
No longer blocks: 571001
Keywords: perf
It stutters here for first secs
(In reply to comment #1) > It stutters here for first secs That should be a separate bug.
Attached file sample
(I'd expect to find this bug in Video, not in Graphics.) On my 2+ year old macbook with 10.5 the Activity Monitor reports 110+% CPU usage on a 360p video not in fullscreen (although the video still plays), the hot path is as follows. Is it what you call slow? 224 mozilla::layers::BasicImageLayer::Paint(gfxContext*, void (*)(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, void*), void*) 224 _moz_cairo_fill_preserve 224 _cairo_gstate_fill 224 _cairo_surface_fill 224 _cairo_quartz_surface_fill 224 _cairo_quartz_draw_image 224 CGContextDrawImage 224 ripc_DrawImage 223 ripc_RenderImage 223 ripl_BltImage 215 ripd_Mark 215 argb32_image 215 argb32_image_mark 170 argb32_sample_argb32 170 argb32_sample_argb32 45 argb32_image_mark
(In reply to comment #3) > Is it what you call slow? Isn't that what slow means? :-)
Hi, I found this bug and saw it marked as Platform: x86 Mac OS X. It certainly is not a Mac problem only. YouTube webm is a currently a pain on Windows too. This is on Vista x64 but as I'll mention later I also tested on another different system and got very similar results. Processor is a 2GHz Core2 Duo. It was locked at maximum speed during testing (since power-saving downcloking could "water-down" the results.) These are from a local (disk) 1280x720 @24fps webm file (downloaded from YouTube). It was always shown at 100% zoom factor (except obviously in fullscreen mode). 100% CPU means both cores loaded fully. Video playing on hidden tab 15% CPU Video visible 55% CPU Video visible, controls visible 65% CPU Fullscreen 20% CPU Fullscreen, controls visible 70% CPU So anything that is not video hidden or fullscreen without controls use disproportionate amounts of CPU. YouTube in-page is even worse because it'll resize the video and is obfuscated so you can't use the "good" fullscreen mode. I also noticed that the modes which consume a lot of CPU seem to spend an inordinate amount of time in kernel mode (over 50%). This is usually a bad symptom (very slow system calls to blit the picture to the screen?). The hidden tab and fullscreen cases used basically zero kernel time. I tested on another machine (a 3GHz P4), same story but worse results. I also tested 3.6.3 (with a Theora video), it shows similar performance (except fullscreen uses a lot of CPU even without controls). I also tested a 720p video in YouTube using both Flash and HTML5 webm, playing resized at the "mid-large" size (about 853x480 pixels on screen). Here Flash used 35% CPU, and webm 80%. For videos that aren't resized, the difference isn't that big, but Flash is still faster. Looking forward for a Firefox that performs a bit better out of fullscreen...
My few coins: Chrome dev with Webm: about 80% + 10% for two chrome processes, 8% Xorg Firefox 64-bit dev with Webm: 125% firefox, 20% Xorg Firefox 3.6.3 with Flash: 100% firefox, 7% Xorg Everything on Linux x86_64 with 720p enabled, with larger frame (using the YouTube button - large video, not full screen). CPU: Intel Core2 Duo P8600.
Please re-open if this is still an issue.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: Graphics → Video/Audio
QA Contact: thebes → video.audio
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: