@iska@mstdn.starnix.network @cyberspook @fugger I think you're right! I still prefer youtube-dl though. Firefox wants pulseaudio for audio input to work, but as I hate pulse, I use this wrapper called apulse. It introduces some lag which makes audio and video out of sync. It's okay for video calls and such, but it pisses me off watching videos like this. With youtube-dl I can also keep the video if I like it — so youtube-dl is my weapon of choice when it comes to dealing with web video.

@m0xee @iska @cyberspook @fugger Are you using dmix? If you just use e.g. "plughw:0" that removes much of the latency (though it will no longer do software mixing for multiple sources). You can actually go even further and modify and coompile it with a low buffersize and periodsize to get absurdly low latency. For example, I just hackily hardcoded 64 and 16 respectively. It works flawlessly and never overruns.

@mikuphile Yeah, I'm afraid giving exclusive sound card access to Firefox won't cut it for me, I often use mpv and other software, but always leave FF running. I'll look into reducing buffer size, thanks for the tip!
Do you remember which file these values are defined in?

@m0xee If you leave the playing video paused for a while, it'll release the soundcard. Anyway, you set the default soundcard in your ~/.asoundrc . It's like "default plughw:0", but I'm not sure. I'll post the relevant parts when I get home.
Actually, I think you can set the buffersize and periodsize of the dmix there, too, but I haven't tried to do it yet. I think it's buffer_size and period_size under slave.
Follow

@mikuphile Oh, I see! I think you've misunderstood me then. ALSA itself works perfectly for me — there is no latency issue. Firefox devs are assholes though and don't want have proper support for ALSA. When I use FF with ALSA directly there is no lag, but there's no input from the mic. I have to use this wrapper — apulse, so FF thinks I'm using Pulse, but it introduces a noticeable lag. It's no biggie, but if there is a fix for that it would be great.I thought this is what you were talking about

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml