Closed Bug 1840309 Opened 2 years ago Closed 2 months ago

The cache is reset too quickly when watching a video on YouTube, if you return to the very beginning of the video after 25-30 seconds of playback

Categories

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

Firefox 114
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: 5silentrain, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0

Steps to reproduce:

  1. Open, for example, this video: https://www.youtube.com/watch?v=n9nXOvQyDyI
  2. Set the highest possible quality i.e. 2160p (4K)
  3. Start video playback and wait for 25-30 seconds to pass
  4. Press the Home button or 0 on your keyboard to move to the very beginning of the video

Actual results:

All downloaded cache will be reset and the video will start loading again, which is very annoying, especially if you have a low Internet connection speed. I have a Mac mini with an M1 chip and 16 gigabytes of memory. Only Firefox is open in the system with a single tab (with this video). Why does Firefox reset the cache after the 25th second of playback with this amount of RAM? This is extremely stupid!

Perhaps this can be fixed by changing some setting on the about:config page. But I, as a simple user, do not even have to think about it.

Chrome and Safari don't have this problem 👌

OS: Unspecified → All
Hardware: Unspecified → All

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)

Steps to reproduce:

1. Open, for example, this video: https://www.youtube.com/watch?v=n9nXOvQyDyI
2. Set the highest possible quality i.e. 2160p (4K)
3. Start video playback and wait for 25-30 seconds to pass
4. Press the Home button or 0 on your keyboard to move to the very beginning of the video

The cache is always completely cleared if you play 35 seconds of this video: https://www.youtube.com/watch?v=n9nXOvQyDyI

Everything is still fine in Chrome and Safari.

Testing both Chrome and Firefox I don't see a difference in behavior. Maybe try in safe mode to see if something you've changed or installed is impacting you playback.

https://www.wikihow.com/Start-Firefox-in-Safe-Mode

Flags: needinfo?(jmathies) → needinfo?(5silentrain)
Severity: -- → S3

Checked it in safe mode. The bug is still easy to reproduce!
Firefox version: 121.0b4 (developer edition)
macOS version: Sonoma 14.1.1 (23B81)

Okay, let's try to make it more difficult :) Let's play the video up to the 50th second.

Steps to reproduce:

  1. Open, for example, this video: https://www.youtube.com/watch?v=n9nXOvQyDyI
  2. Set the highest possible quality i.e. 2160p (4K)
  3. Start video playback and wait for 50 seconds to pass
  4. Press the Home button or 0 on your keyboard to move to the very beginning of the video

The cache is always completely cleared if you play 50 seconds of this video!

Notice the playback bar: https://i.imgur.com/fbjRTT1.jpg
After we press 0 on the keyboard, the white part of the playback bar will begin to fill in again: https://i.imgur.com/X3jnEVM.jpg

Everything is still fine in Chrome and Safari.

Flags: needinfo?(5silentrain)

The video you linked as an example is very huge and has very high bit rate (17458kb/s).

Firefox will only cache a limited size of YouTube videos, and it is not controlled by Firefox, but by YouTube, and it as about 100MB

As the video you link has huge bit rare, so 100MB will only cache about 20 seconds or so,

1080p will cache about 590 seconds.

I already made to bug reports about this https://bugzilla.mozilla.org/show_bug.cgi?id=1876709 and https://bugzilla.mozilla.org/show_bug.cgi?id=1876460

Flags: needinfo?(jmathies)

Why then are there no problems with this in Chrome and Safari?

@5silentrain I am not saying it is not a bug, I files 2 bugs of the same problem.

Your issue is specific as it about a video with high bit rate. My bug is more accurate as it is addressing the cache size limit for YouTube in Firefox

I didn't test other browsers, but sure it is a bug in Firefox that Firefox has no control over YouTube videos.

It is the same bug as the one I reported, but mine is more general, please read both bugs I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1876709 and https://bugzilla.mozilla.org/show_bug.cgi?id=1876460

It is the same bug as the one I reported, but mine is more general…

Let the Mozilla developers decide.

Tested in the most recent dev version 128.0b9, but unfortunately the bug/bad behavior is still present in Firefox. As expected, there are no problems with this in Chrome and Safari.

Tested following these steps to reproduce:

  1. Open, for example, this video: https://www.youtube.com/watch?v=n9nXOvQyDyI
  2. Set the highest possible quality i.e. 2160p (4K)
  3. Start video playback and wait for 50 seconds to pass
  4. Press the Home button or 0 on your keyboard to move to the very beginning of the video

The cache is always completely cleared if you play 50 seconds of this video.

Testing both Chrome and Firefox I don't see a difference in behavior. Maybe try in safe mode to see if something you've changed or installed is impacting you playback.

Please find someone else who can confirm this bug in Firefox! 🙏

Firefox will increase the cache to 150MB in the next release 129. The current value is 100MB

If you want to change it now, you can set even higher cache, then set

media.mediasource.eviction_threshold.video to 209715200 (200MB)
media.mediasource.eviction_threshold.audio to 41943040 (40MB)

They value are not exited by default, if it is your first time changing them you have to add them

Thanks, but I've almost completely switched to Chrome. Google's web browser doesn't have all these problems.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Flags: needinfo?(jmathies)
Resolution: --- → WONTFIX

Why did this bug report get the "WONTFIX" status?! 🤨 🤔 I checked for this problem in the current stable version 133.0.3. Even after 50 seconds of 4K video playback, the cache is not reset and the video does not start caching again. That is, now in Firefox I observe behavior that matches Chrome and Safari, which is good news 👍 So this bug report can be safely given the "RESOLVED FIXED" status, not "RESOLVED WONTFIX".

I specifically checked it on the video from comment #5: https://bugzilla.mozilla.org/show_bug.cgi?id=1840309#c5

Anyway, THANK YOU SO MUCH guys for improving this cache situation 🤝 🎉 🥳

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: