Open Bug 1857106 Opened 1 year ago Updated 11 months ago

Frame skipping/stuttering after pause and resuming video playback (mainly youtube)

Categories

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

Firefox 118
Unspecified
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: mmbossoni, Unassigned)

Details

(Whiteboard: [profile at https://github.com/elFarto/nvidia-vaapi-driver/issues/216#issuecomment-1605404514])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

1 - Configured video playback to use hardware acceleration (like described in https://github.com/elFarto/nvidia-vaapi-driver)
2 - Played a youtube video
3 - Paused it and resumed quickly (like two taps on space bar with 5 seconds apart at most)

Actual results:

Video resumed playback was skipping frames/stuttering.
If I, in this state, press the back arrow on keyboard (to go back 5 seconds), video playback is smooth again

Expected results:

Playback resumed smoothly

See https://github.com/elFarto/nvidia-vaapi-driver/issues/216
This is happening for a while, and not just on NVIDIA GPUs, so it seems related to gstreamer/hw acceleration.

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

ok so turning on gpu layers doesn't fully fix it, there's still visible stuttering but the frames don't appear to be dropped in the stats

the true fix for me was installing pipewire, pipewire-audio, and pipewire-pulse

it'll start dropping a few frames normally based on your hardware, but there will be no change due to pausing

(or, just fully uninstall pulseaudio and just use alsa if you don't want the dropped frames)

Would you enlighten me how those are associated?
Just video is skipping frames. Audio is fine.
Also, it just happens when hardware acceleration is on apparently.

I don't know why exactly it happens, but it's only happening with PulseAudio, and I hear that videos' clocks are based on the audio stream when sound is on but if it isn't it's based on the system clocks. Try pausing and unpausing a muted video and see if that also drops frames.

Thanks.
Seems like disabling pulseaudio's time scheduling did the trick... At least it seems so.

Severity: -- → S3
OS: Unspecified → Linux
Whiteboard: [profile at https://github.com/elFarto/nvidia-vaapi-driver/issues/216#issuecomment-1605404514]
Component: Audio/Video: Playback → Audio/Video: cubeb
You need to log in before you can comment on or make changes to this bug.