Open Bug 1701301 Opened 5 years ago Updated 4 months ago

Slow Video loading Speed in Youtube

Categories

(Core :: Audio/Video, defect, P3)

Firefox 87
defect

Tracking

()

People

(Reporter: yoasif, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [media-youtube] [media-performance])

Attachments

(1 file)

From https://www.reddit.com/r/firefox/comments/mbpy9t/slow_video_loading_speed_in_youtube/

Basic information

Steps to Reproduce:

When I try to watch a 4k60 Video it needs to buffer every 3-4 seconds which means it's pretty much impossible to watch. 4k30 or 1440p60 seem to play fine.

Expected Results:

Chrome also plays back 4k60 Videos no problem (even 8k60 seems to load fast enough) but it is also able to utilize speeds of up to 80 mbit/s.


More information

Looking at Task Manager I can see that FF never downloads YT Videos with more than 20-25 mbit/s (doesn't change between 4k60/4k30/1440p60). However doing a speedtest I can easily get my full 100 mbit/s.

Profile URL: https://share.firefox.dev/2P6OVRp

Basic systems configuration:

OS version: Windows 10

GPU model: AMD Radeon R5 5600x

Number of cores: 6 Cores

Amount of memory (RAM): 16gb

Thanks so much for your help.

Attached file about:support

(In reply to Asif Youssuff from comment #0)

Profile URL: https://share.firefox.dev/2P6OVRp

The profile shows activity from an add-on called "Ultrawidify", which paints video into a 2d canvas. That's terrible for performance.
https://share.firefox.dev/320FbLn

Asif, do you mind asking the original reporter to disable "Ultrawidify" and see if the issue still persists and collect another profile if it still persists?

Flags: needinfo?(yoasif)

Sean, new profile with Ultrawidify disabled: https://share.firefox.dev/2OHU1mP

Flags: needinfo?(yoasif)
Component: Performance → Audio/Video

Question to media folks, are we not even trying to buffer as much as other browsers?

But I can't personally reproduce this. I seem to get more dropped frames in Chrome.

For sites like YouTube the buffering behaviour is complicated because those sites use MediaSource Extensions (MSE), so they fetch the media in JS and then fill buffers that Firefox controls. So part of the handling is done by Youtube and part by us. Since the browser can do things like evict data from the buffers, it's possible we evict too much compared to Chrome (which would result in less over all buffered). If we're fetching slower than Chrome from JS that non media specific.

Looking at the profile I suspect this could be a decoding related bound rather than network, something similar to bug 1692881. Assuming the video was playing throughout the profile in comment 4, there's some noticeable points where we stop pushing audio and video, which is usually the case if we get behind on decoding. Alastor, do you have any further thoughts or insights?

Blocks: 4k-video
Severity: -- → S3
Flags: needinfo?(alwu)
Priority: -- → P3
Whiteboard: [media-youtube] [media-performance]

I think this issue is different from bug1692881, because you can see MDSM entered BufferingState multiple times, which is a different sign from the bug1692881. On network part, I saw that Youtube periodically downloaded around 8.14Mb, so the problem could be that we incorrectly entered BufferingState and didn't push any new data into media queue. BTW, I couldn't reproduce this issue on my Linux and MacOS.

Would you mind to help us ask the reporter to capture debug log with MOZ_LOG=MediaDecoder:5,MediaSource:5,MediaSourceSamples:5? Also, it might also worth to ask what video codec the reporter is seeing while wathcing the 4K content. Thank you.

Flags: needinfo?(alwu) → needinfo?(yoasif)

The videos I was testing with seemed to all use vp9 as their codec.

About the log, FF updated to 88.0 and it seems to work as intended right now. Would you still like me to do it?

Flags: needinfo?(yoasif)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: