two browsers losing audio-video sync

Issues related to applications and software problems and general support
Post Reply
iwishitwouldwork
Posts: 88
Joined: 2014/02/08 14:56:39

two browsers losing audio-video sync

Post by iwishitwouldwork » 2020/01/11 07:12:08

Centos 8
up to date on patches

The usual advice is to clear out the cache and restart.
I've been doing that on both
opera
firefox
but after a while the audio will lag behind the video. This
will manifest itself rather obviously in a couple of ways.
1. click play, and the video begins moving along. The
sound comes in about 5 seconds later.
2. click stop or even exit. The video or browser window
will complete disappear and the sound continues for about
5 seconds.
Usually (always?) this is provoked by having a second browser
window open (no, they aren't both running videos) and pausing
the video to read something.
I "reset" by clearing cache, stopping and restarting.

I have both pulseaudio and alsa installed. To wit:

Code: Select all

[root@ws ~]#  rpm -qa | grep pulse
pulseaudio-utils-11.1-23.el8.x86_64
alsa-plugins-pulseaudio-1.1.9-1.el8.x86_64
pulseaudio-libs-glib2-11.1-23.el8.x86_64
pulseaudio-libs-11.1-23.el8.x86_64
pulseaudio-11.1-23.el8.x86_64
pulseaudio-module-bluetooth-11.1-23.el8.x86_64
pulseaudio-module-x11-11.1-23.el8.x86_64

Code: Select all

[root@ws ~]#  rpm -qa | grep alsa
alsa-plugins-pulseaudio-1.1.9-1.el8.x86_64
alsa-ucm-1.1.9-4.el8.noarch
alsa-lib-1.1.9-4.el8.x86_64
alsa-lib-devel-1.1.9-4.el8.x86_64
alsa-utils-1.1.9-1.el8.x86_64
So -- is anyone else seeing this? This same machine had no problems
with synchronization when running Centos 7. All my searching says to
clear the cache. It's annoying to do that. (I know, that's a bit of a whine.)
Oh! Almost forgot: on Firefox I went to "about:config" and turned off
the disk cache. That didn't help.

Code: Select all

20.     firefox is screwing up audio.  it gets ahead of the video.
        sorry.  video gets ahead of audio.
        going to try this.
        browser.cache.disk.capacity     64 (was 1024**2)
        browser.cache.disk.smart_size.enabled   false (was true)

iwishitwouldwork
Posts: 88
Joined: 2014/02/08 14:56:39

Re: two browsers losing audio-video sync

Post by iwishitwouldwork » 2020/01/28 06:49:17

Hmm. Well, I've been using the "most recent" firefox for linux 64 bit x86
instead of the one that comes with centos for a little while now.

firefox 72.0.2 is working for me.

This flavor of firefox has not, so far, had the problem. I'm not 100%
convinced that it won't happen. I'm not 100% convinced that this
isn't a case of recent good luck. But that's what I'm seeing. FWIW.

iwishitwouldwork
Posts: 88
Joined: 2014/02/08 14:56:39

Re: two browsers losing audio-video sync

Post by iwishitwouldwork » 2020/01/28 17:13:36

Nope. Spoke too soon. It's broken again.

Since I first had the problem there has been an update to the
kernel and other patches. All that has been done, and I have
rebooted. Today firefox is broken again. So -- at least so far --
there is no fix to this problem. Assuming anyone else even
has this problem.

bonedome
Posts: 201
Joined: 2017/04/22 08:11:04

Re: two browsers losing audio-video sync

Post by bonedome » 2020/01/29 18:00:47

Hello
that sounds like a right royal pita, but several things come to mind.
I would have thought more cache not less would help.
You can set firefox to delete the cache every time you close it under preferences/privacy & security/history/use custom settings for history/clear history when firefox closes/settings tick cache
Have you tried hardware acceleration, firefox "should" set this by default if it's available, it's in preferences/general/performance, you may have to install libva and possibly one of the drivers that your graphics card supports (for vaapi) or libvdpau plus driver (for vdpau)
If you install vdpauinfo or libva-utils you can check what if any HWaccel is supported on your machine with the commands vainfo and vdpauinfo
The other option is to use mpv with youtube-dl, the youtube-dl package supports hundreds of sites not just youtube, this is how I watch web videos
Open a terminal, copy web page url, type mpv and paste url, hit enter, no ads, no annotations just video
The epel version is quite old so update with

Code: Select all

youtube-dl -U
If it's just youtube you could try freetube https://freetubeapp.io/#download if it doesn't work first time you need to run (as root)

Code: Select all

chmod 4755 /opt/FreeTube/chrome-sandbox
It is also available as a flatpak, although I haven't got it to use HWAccel it works fine for me

Post Reply