Closed Bug 1905293 Opened 3 months ago Closed 3 months ago

Weird Youtube buffering behavior (127.0.2)

Categories

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

Firefox 127
defect

Tracking

()

RESOLVED DUPLICATE of bug 1906342

People

(Reporter: chobits1717, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0

Steps to reproduce:

Just... watch 1080p/60fps videos in Firefox. Having random stalling/buffering in vp09 codec videos (at least from what I've noticed so far). I haven't found a pattern, it just... happens (the video isn't touching the end of the loaded grey part of the time bar either), and when it does, buffer health drops to 0 (but connection speed stays good according to Stats for Nerds). My connection is fine, and this doesn't seem to happen in Edge. No idea why I'm having so many weird issues with Youtube playback, but this stalling shouldn't be happening at all.

Actual results:

At random, the video just stops playing, and will sometimes start to buffer. Will also drop a bunch of frames according to Stats for Nerds.

Expected results:

The video should play smoothly the whole time

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

Hi, please provide clear steps to reproduce, including links, as a list of steps, and how and where to see which data that you see, and which add-ons/extensions you have installed.

Flags: needinfo?(chobits1717)

Make sure you're using the latest version. Press Alt → Help → About Firefox.

After that, set DoH to Default Protection or add a temporary exception for YouTube: Add sites to the Exceptions list. This has been fixed only for ESR and version 128: Bug 1904168.

(In reply to Andre Klapper from comment #1)

Hi, please provide clear steps to reproduce, including links, as a list of steps, and how and where to see which data that you see, and which add-ons/extensions you have installed.

The only extension I have installed is uBlock Origin (which is also installed in Edge, where this doesn't happen). It happens at random, so I don't have clear reproduction steps.

(In reply to 08xjcec48 from comment #2)

Make sure you're using the latest version. Press Alt → Help → About Firefox.

After that, set DoH to Default Protection or add a temporary exception for YouTube: Add sites to the Exceptions list. This has been fixed only for ESR and version 128: Bug 1904168.

Would DoH even be responsible? I have it set to Off, not Default. Also, I was referring to bugs like Bug 1900191 and Bug 1904168 that have supposedly been fixed in 127.0.2 (which I am currently on).

I'll try and get a profile or video next time it happens, but as of now its totally random.

Flags: needinfo?(chobits1717)

Also, in regards to playback, I occasionally have weird behavior with Youtube livestreams where a few seconds in it'll no longer be "current" (the red Live button becomes grey). I click it, it stays red for a fee seconds, then turns grey again. I click it again and then it gets stuck in a loop of turning red for a moment, back to grey, and repeating the same couple of seconds each click until the stream kinda dies. This is also random, so I'll grab a video next time it happens, but there's seemingly random times where the stream just... cannot resync itself and stay synced with the live feed.

Also, one more piece of info, was that I first noticed the buffering bug on this video: https://www.youtube.com/watch?v=FhdJ0qD19Mk

That and it seems to be more prone if I skip around the video at all first.

If would be great if you can capture a profiled result if possible, the instructions can be found here. FYI, it might be related with bug 1904937. If that is a case, you can tell that by checking whether the current time of the Youtube player would be stuck in incorrect position, right before the video enters buffering.

Blocks: yt-playback
Flags: needinfo?(chobits1717)

I'll keep an eye on that next time the video stalls, but from what I remember i believe it did do something like that.

Here's a video and profiled result for the Youtube livestream bug I mentioned earlier, my or may not be related:

https://imgur.com/a/m55nnOm
https://share.firefox.dev/45MmKKd

Flags: needinfo?(chobits1717)

Video and profiled result for the buffering bug. I couldn't tell if it was in the incorrect position or not, I skipped around the video a bit and it randomly just stopped loading the light grey then buffered once it got to the end. It then wouldn't buffer past that point if I rewound the video until I clicked a part of the time bar past that point.

https://imgur.com/a/lb2JSbr
https://share.firefox.dev/3xt7HZx

EDIT: proper link for the buffering bug video

https://imgur.com/Dc6Sehn

Sorry, did you capture the profile by using about:logging? As I didn't see any logging from the profile you provided, I guess you did the profiling via the Firefox profiler icon, or from the profiler page? Would you mind do it again by following this instruction?
Thanks!

Flags: needinfo?(chobits1717)

I captured them using the Profiler. Next time it happens I'll use about:logging! Should I set that one to Graphics? and did you give the videos I posted a look?

No, just media playback preset is enough. Yes, I've check the video you posted in the comment 10, but it's hard to tell if it's the same problem as bug 1904937 without checking the logs. Thanks!

You're welcome, and thank you! I'll try and grab a log next time it happens, but its random so I'm not sure how long that will take!

And thanks for bearing with me! Firefox has had a lot of Youtube-related issues lately and I seem to be getting hit with a lot of them!

Here's a profile for the weird VP09 steam buffering problem, still waiting on the youtube stalling problem since it hasn't happened for a couple of days.

https://share.firefox.dev/4eEeSid

Hello, by checking you profile, I'm assuming the data Youtube provided have flaws, but I would like to confirm that with another profile, would you mind to help me capture another profile again by using different log modules?

Follow the instruction here, after selecting media playback preset, please use timestamp,HTMLMediaElement:4,HTMLMediaElementEvents:4,cubeb:5,PlatformDecoderModule:5,AudioSink:5,AudioSinkWrapper:5,MediaDecoder:5,MediaFormatReader:5,GMP:5,EME:5,MediaSource:5,MediaSourceSamples:5 to replace the current log modules. After doing that, all steps are the same.

Thank you!

(In reply to Alastor Wu [:alwu] from comment #16)

Hello, by checking you profile, I'm assuming the data Youtube provided have flaws, but I would like to confirm that with another profile, would you mind to help me capture another profile again by using different log modules?

Follow the instruction here, after selecting media playback preset, please use timestamp,HTMLMediaElement:4,HTMLMediaElementEvents:4,cubeb:5,PlatformDecoderModule:5,AudioSink:5,AudioSinkWrapper:5,MediaDecoder:5,MediaFormatReader:5,GMP:5,EME:5,MediaSource:5,MediaSourceSamples:5 to replace the current log modules. After doing that, all steps are the same.

Thank you!

But that's what I already did for the profile I just provided in my previous comment

No, this one contains more log than the one you captured last time, I didn't notice that there are some log modules not available on Release version yet. It was my fault, I should have told you earlier, sorry :(

(In reply to Alastor Wu [:alwu] from comment #18)

No, this one contains more log than the one you captured last time, I didn't notice that there are some log modules not available on Release version yet. It was my fault, I should have told you earlier, sorry :(

Its okay, I'll grab another log next time this happens

Hello, I believe I'm having the same issue. I have found a video that reproduces the problem every time, although not every video does this.

https://www.youtube.com/watch?v=_yu47m9epZ0
https://share.firefox.dev/3xGTKai

Reproduction steps:

  • Click the YouTube link
  • Watch for 70 seconds
  • Buffer runs out

(In reply to Andrew from comment #20)

Reproduction steps:

  • Click the YouTube link
  • Watch for 70 seconds
  • Buffer runs out

I can't reproduce this on my Windows 11, what resolution you watch? 1080P? does this issue also happen on lower resolution?

--

Would any of y'all mind help me check if this build fixes the problem or not? The profiled result from the comment 20 shows that Youtube just stopped appending new data with no reason, I wonder if this is the same issue with bug 1904937.

Would any of y'all mind help me check if this build fixes the problem or not? The profiled result from the comment 20 shows that Youtube just stopped appending new data with no reason, I wonder if this is the same issue with bug 1904937.(In reply to Andrew from comment #20)

I cloned my 127.0.2 profile and used it with that build, and it does appear to fix the problem. I watch at Auto (480p). With A/B testing a popular thing I won't definitively say it's fixed, but it does look promising. Thanks!

Hopefully 128 fixes both of these issues

(In reply to Alastor Wu [:alwu] from comment #21)

(In reply to Andrew from comment #20)

Reproduction steps:

  • Click the YouTube link
  • Watch for 70 seconds
  • Buffer runs out

I can't reproduce this on my Windows 11, what resolution you watch? 1080P? does this issue also happen on lower resolution?

--

Would any of y'all mind help me check if this build fixes the problem or not? The profiled result from the comment 20 shows that Youtube just stopped appending new data with no reason, I wonder if this is the same issue with bug 1904937.

hey, i've still had issues with buffering etc as well and was just able to catch it while logging. unfortunately the profiler page was very laggy cause it was eating up all my ram. the profile was 1:30 mins long and i wasnt able to compress the whole thing with everything checked it gave me an error. so theres a full length profile with only the last 4 boxes and one of the end of the log with all boxes. i was able to reproduce the issue at the end of the profile so the second one is probably better. the first ~1 min of the full profile is just me trying to reproduce it.

full length profile with 4 last checkbox: https://share.firefox.dev/468T2Q9

profile of only last 30 seconds with all all checkboxes: https://share.firefox.dev/3zCQ89M

more info: i had issues VERY frequently before the recent updates its rarer now. in this video the issue i captured was the video freezing while the audio keeps playing. i was watching in 4k. the video unfroze and caught up after ~15 secs after which i stopped the log.

this was the video https://www.youtube.com/watch?v=bCuECpCXQAs i had the video freezing with audio playing issue while watching normally after which i started logging and fast forwarded and skipped around the video for like 30 seconds before it happened again. i wasnt fast forwarding or skipping very aggressively and either way it happened naturally just before i started logging.

i am also still sometimes getting the issue where the video reaches the end of the buffer and skips ahead a few seconds but havent been able to reproduce that to catch it with a profile. let me know if you need any more info.

also sorry if this isnt the right bug to comment this on as its not the exact same issue as in the original post but it is definitely related to the general youtube buffering etc. issues so hopefully its ok to post here. (had to make a new comment cause i cant edit the previous one as far as i can tell)

I have bug 1904937 and bug 1906342 to address the rest of infinite buffering problems, and one of these bugs was already landed on Fx129, and another one is still on reviewing. I will let them all deploy on Fx129 and hopefully they can fix all buffering issues.

Just had a random Youtube video buffer on a black screen for a solid two minutes before loading up, and even trying to skip around it resulted in even more buffering on a fast connection. No idea what's going on here, but I'll profile it if it happens again.

Flags: needinfo?(chobits1717)

FYI the fixes for Youtube (bug 1904937 and bug 1906342) has both been deployed to Nightly today. Feel free to check the latest Nightly to see if the issue still presents or not. If that fixes the issue, the solution will ride the train of Fx129. Thanks!

(In reply to Alastor Wu [:alwu] from comment #28)

FYI the fixes for Youtube (bug 1904937 and bug 1906342) has both been deployed to Nightly today. Feel free to check the latest Nightly to see if the issue still presents or not. If that fixes the issue, the solution will ride the train of Fx129. Thanks!

Hi, I'm on the latest Nightly and things seem to be better overall but I still have a minor problem where at the start of some videos the audio plays but the video is intermittently frozen/choppy. After about 3 seconds everything gets working correctly.

Here's the output of the profiler I ran that recorded the issue: https://share.firefox.dev/3W5yof7

Adding another profile capture where the issue was more pronounced - https://share.firefox.dev/3zFwZEx

Updating that things seem to be working well now👍

Thanks for the confirmation! I'm going to mark this bug as resolved (by bug 1906342) Please feel free to file a new bug and NI (request information) me if anyone sees any new problem.

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Duplicate of bug: 1906342
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.