New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 595249 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 466667
Owner: ----
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

4K res YouTube videos lag in Chrome, while they play correctly and smoothly in Safari

Reported by jeremydu...@gmail.com, Mar 16 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Example URL:
https://www.youtube.com/watch?v=LX803CyNeB8

Steps to reproduce the problem:
1. Open a video that has 4K resolution on YouTube through Chrome (latest stable version) [and on a similar Mac to what is stated below in the 'other comments']
2. If 4K is not selected, select it.
3. The video will lag very badly, stopping and starting and the audio stutters.

What is the expected behavior?
For the 4K resolution video to play smoothly like it does on Safari.

What went wrong?
The 4K YouTube video does not play smoothly on my Mac through Chrome, playing the same video on Safari there is no issue.

Did this work before? No 

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.87  Channel: stable
OS Version: OS X 10.11.4
Flash Version: Shockwave Flash 21.0 r0

My Mac is a MBP 13" Retina 2015, I've attached a screenshot of the 'About this Mac' pane showing this and the CPU/GPU and Memory.
4K video definitely works smoothly playing local files and through Safari on YouTube, I know it's fully supported on here except Chrome doesn't seem to play 4K streams correctly.
 
Screen Shot 2016-03-16 at 6.37.45 PM.png
172 KB View Download
Cc: ccameron@chromium.org
ccameron: What's the status for 4k video?
Cc: ericde@chromium.org
I don't have the network to load 4k smoothly off-corp. I'll check tomorrow.

4k should work fine, but the decode is going to cost a ton of CPU usage. >720p is about the crossover point where not having hardware decode starts hurting.
I have 35Mbps~ downstream so 4K streaming is no issue.

And yes it should but does not work correctly on Chrome, 1440p works fine on there but once jumping to 2160p it lags terribly. On Safari although as I mentioned, 4K works no issue. There is high CPU usage but it plays smooth on Safari.
Tried this with a 2015 13-inch rMBP and with a 15-inch, and didn't have issues.

Can you capture a trace? Do this by
1. Go to about:tracing
2. Select Record in the corner
3. Select "Manually select settings"
4. Select gpu, browser, media, renderer_host
5. Press record, and grab a few seconds when there is laggy video

done, at first I played that youtube link on 1440p then switched to 4k.
trace_1440p_2160p.json.gz
3.0 MB Download
Cc: pinkerton@chromium.org
Status: Untriaged (was: Unconfirmed)
YouTube serves vp9 to Chrome, but because Safari doesn't support vp9, it serves h264 to Safari.

vp9 is lower bandwidth, but hardware decode isn't in current hardware.

The issue here is that the CPU decoder can't decode frames fast enough (see attached screenshots).
video-choppy.png
234 KB View Download
video-smooth.png
217 KB View Download
So is there any way to switch Chrome to default to x264 ? You'd think it'd automatically switch over if vp9 can't decode it smoothly.
Future release patch?
There's a free Chrome extension -- haven't tried it, can't vouch for it, but I hear people use it:
https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal?hl=en-US

Do post here if it improves the situation.
Thanks for your responses, I've downloaded the extension and works like a treat! CPU usage goes down from ~250% to just ~30%, and the best part, 4K plays really smoothly.

In the possibly near future will something official be added to switch from vp9 to x264 on Macs?
Cc: markdavidscott@google.com hughfi@chromium.org
+hugh and mark from our recent VP9 4k discussion.
Cc: jzern@chromium.org
A few things.

1. The video mentioned in this bug has an extremely high average bitrate for vp9 4K. So that is definitely part of the issue. I didn't investigate further if there are really high peaks, but from watching the clip there might be.

2. We have been able to playback 4K 30fps vp9 on retina mac book pros in Chrome for over a year. This was even back before the compositor fixes. Has something changed recently?

3. Just because a frame takes longer than 33ms to decode (30fps) doesn't necessarily mean there is an issue. This is why we have a jitter buffer.

4. Why does the audio decode take the same amount of time as the video decode in the trace?


Cc: fgalligan@chromium.org
For #4 it's because video decode is blocking the audio thread. This shouldn't be an issue on M50+ anymore.
I mentioned this in another thread, but many of the Macbook Pros used internally are the variants with quad-core i7 processors that have slightly over double the performance of the dual-core i5 model that was reported in #6.

This corroborates with direct observation of similar i5-based Windows machines that can struggle on 4K 30 content (showing 100% CPU usage during decode).
I have been doing research and this is just Chrome's fault for enabling VP8/9 by default when there are basically no CPU/GPU's that can decode this efficiently still.
Many other Mac, and Windows users will use Safari/IE and notice drastic battery savings and less heat because they are using H.264.

Chrome needs to give up on this 'experiment' as there are obviously a lot of people unhappy with it
Mergedinto: 466667
Status: Duplicate (was: Untriaged)
this is a duplicate of 466667. 4k vp9 video is known choppy and stutter. 
yes, even 1080p vp9 drains the cpu
thanks

Sign in to add a comment