Page 1 of 1

out-of-sync a/v using pulseaudio

Posted: 15 Jun 2011 15:49
by tomyankashing
Starting from version 1.1.10, I found that audio and video is not sync (the audio delays) in vlc when using with pulseaudio output module
Sorry that I did not do tests for different sources but I have compared it with SMPlayer with "pulse" output, VLC the same version itself with ALSA as the output module, and even mpc+ffdshow-tryout in Windows, the audio and video sync, so I am quite sure that it is not the source's problem (p.s. the source i use is a DVD)

Arch Linux x86_64 (with all testing repos enabled and all the packages are up-to-date)
vlc version: 1.1.10-3
pulseaudio version: 0.9.22-2
sound card: ASUS Xonar Essence STX (CMI8788 [Oxygen HD Audio])
I am using the analog output of the sound card

Thank you for your great work
The player is really marvellous and it helps me a lot

Re: out-of-sync a/v using pulseaudio

Posted: 15 Jun 2011 16:27
by Rémi Denis-Courmont
This is a known issue with the PulseAudio plugin. No volunteers to fix it though.

Re: out-of-sync a/v using pulseaudio

Posted: 16 Jun 2011 06:22
by tomyankashing
Thank you for your answering :D
But I aware that there is a line "Rewrite of the pulseaudio audio output module" in "What was new in 1.1.10"
I am not sure that there is no such problem in versions before but as far as I remember the answer is no
So it is an issue of the rewrite and the rewrite is necessary for fixing other bigger problem(s)? (Or I just remember wrongly? :roll: )

I hope that I am not being annoying :oops:

Re: out-of-sync a/v using pulseaudio

Posted: 16 Jun 2011 08:41
by Rémi Denis-Courmont
In VLC 1.1.9, PulseAudio output leaks memory like hell and crashes the whole system. Hardly better.

Re: out-of-sync a/v using pulseaudio

Posted: 16 Jun 2011 11:28
by tomyankashing
what a pity
hope someone could fix it soon

Re: out-of-sync a/v using pulseaudio

Posted: 08 Jul 2011 18:17
by WH4K
I had no problems whatsoever using VLC in Ubuntu with PulseAudio for a long time, but as of a few weeks ago, BIG problem. I am running Ubuntu 10.04 with all current updates & patches.

It was hard to notice at first, but it works something like this: Video and audio will slowly get out of sync as I watch a file, becoming really noticeable and annoying after 15 minutes or so.

I first noticed this problem when watching episodes of House, MD. Around halfway through each episode, the audio became slightly delayed, compared to the video. I wasn't sure at first what was happening; I simply noticed there was something "weird" about the actors' mouths when they were delivering lines. The problem became more apparent the longer I watched.

If I stop playing the file, restart play and skip to the same point, the sync is again perfect for a while. I am watching *.iso images of the original DVDs, so there is no question of any intermediate conversion process introducing errors. In Windows, audio/video sync is never a problem. I am fairly sure this is not a problem with the files themselves.

I think this problem may have started when I upgraded to VLC 1.1.10.

Re: out-of-sync a/v using pulseaudio

Posted: 15 Jul 2011 14:45
by Michele
So the only thing to do is using VlC 1.1.9 until the bug will be fixed.

Re: out-of-sync a/v using pulseaudio

Posted: 15 Jul 2011 16:55
by Rémi Denis-Courmont
...if you don't mind your system crashing.

Otherwise, this works a lot better: 'pasuspender vlc -A alsa'

Re: out-of-sync a/v using pulseaudio

Posted: 15 Jul 2011 21:32
by Michele
...if you don't mind your system crashing.

Otherwise, this works a lot better: 'pasuspender vlc -A alsa'
Thanks for the advice but with the previous version of Vlc I've never had this kind of problems.

Re: out-of-sync a/v using pulseaudio

Posted: 17 Jul 2011 10:25
by roi_shoko
Hi,

Had the audio sync issues with the 1.1.10 VLC with Ubuntu 10.04.2 LTS .

I removed pulse-audio and installed alsa as a default and got sync back.

Note that i saw the sync issues with some other players as well such as Kaffiene etc. any how now all is good see here how to:

http://howto.blbosti.com/2010/04/ubuntu ... ulseaudio/

Cheers,

Roi

Re: out-of-sync a/v using pulseaudio

Posted: 17 Jul 2011 11:44
by Michele
Hi,

Had the audio sync issues with the 1.1.10 VLC with Ubuntu 10.04.2 LTS .

I removed pulse-audio and installed alsa as a default and got sync back.

Note that i saw the sync issues with some other players as well such as Kaffiene etc. any how now all is good see here how to:

http://howto.blbosti.com/2010/04/ubuntu ... ulseaudio/

Cheers,

Roi
Removing Pulseaudio you might have issues with other software. I know that pulseaudio isn't perfect but it is an important element of the system.

Re: out-of-sync a/v using pulseaudio

Posted: 17 Jul 2011 13:02
by roi_shoko
Hi,

"might have" but i don't have any problem.

Try it.

Cheers,

Roi

Re: out-of-sync a/v using pulseaudio

Posted: 19 Jul 2011 06:07
by sal22
Temporary work around.

I created two scripts and called one script start_pulse.sh and stop_pulse.sh and placed them in .gnome2/nautilus-scripts . I did this so I could right click the mouse and go under scripts to start and stop pulse.

what's in the start_pulse.sh file
#!/bin/bash
#this will start pulseaudio
pulseaudio


what's in the stop_pulse.sh file
#!/bin/bash
#this will stop pulseaudio this fixes vlc 1.1.10 audio desync problem
echo autospawn = no|tee -a ~/.pulse/client.conf && killall pulseaudio


remember to give the files executable permissions!!!!

It's a workaround but I like to have people's voices sync up to when their mouth is moving

Re: out-of-sync a/v using pulseaudio

Posted: 19 Jul 2011 08:30
by Rémi Denis-Courmont
This is far simpler:

Code: Select all

pasuspender vlc -A alsa
(pulseaudio-utils must be installed)

Re: out-of-sync a/v using pulseaudio

Posted: 22 Jul 2011 21:06
by AndreD
same problem here, on ubuntu 10.04 , worked very well until a recent update, every other player I have still works fine, but VLC is out of sync.
please fix the regression.

Re: out-of-sync a/v using pulseaudio

Posted: 23 Jul 2011 10:32
by Rémi Denis-Courmont
Easier said than done.

Re: out-of-sync a/v using pulseaudio

Posted: 28 Jul 2011 12:47
by Bill_MI
Hmmmm... I set the VLC "Audio Output Module" to ALSA and the sync problem is fixed. BUT... any glitch kills audio, even a stop/start. In particular, the live stream from TWiT (BitGravity).

Anyone know why this wouldn't work? Another pulseaudio or VLC bug? I know ALSA is a pulseaudio module. Ubuntu 10.04 using VLC from the bleeding-edge PPA.

Re: out-of-sync a/v using pulseaudio

Posted: 28 Jul 2011 13:20
by Michele
Hmmmm... I set the VLC "Audio Output Module" to ALSA and the sync problem is fixed. BUT... any glitch kills audio, even a stop/start. In particular, the live stream from TWiT (BitGravity).

Anyone know why this wouldn't work? Another pulseaudio or VLC bug? I know ALSA is a pulseaudio module. Ubuntu 10.04 using VLC from the bleeding-edge PPA.
I had this problem even with Vlc 1.1.4 installed on Ubuntu 10.10. I think this is a PulseAudio bug.

Re: out-of-sync a/v using pulseaudio

Posted: 28 Jul 2011 14:23
by Rémi Denis-Courmont
The ALSA output was designed with (10-years old) audio hardware in mind. Its buffering characteristics don't really work with PulseAudio in my experience. I suspect the buffers are too short/late.

This has not been a high priority since there was a native PulseAudio output, and well the few VLC developers are always busy. Bottom line, if you want to use ALSA, please make sure that PulseAudio is suspended and that the default ALSA device is not PulseAudio.

Re: out-of-sync a/v using pulseaudio

Posted: 29 Sep 2011 16:03
by jon4t2
This is far simpler:

Code: Select all

pasuspender vlc -A alsa
(pulseaudio-utils must be installed)
FYI: For Scientific Linux 6.x (should work for RHEL, CENTOS, Fedora, etc. as well):

Code: Select all

pasuspender vlc -s alsa

Re: out-of-sync a/v using pulseaudio

Posted: 29 Sep 2011 18:46
by Rémi Denis-Courmont
This all should be fixed in VLC 1.1.12 by now. Alternative, turning off tsched in pulse.conf can work around the problem.

Re: out-of-sync a/v using pulseaudio

Posted: 29 Nov 2011 02:49
by Bill_MI
The bleeding edge PPA finally got 1.1.12 to us Ubuntu 10.04 LTS users last week. Thumbs up! Sync solved.

Nothing else significantly touched it without breaking something else.

Re: out-of-sync a/v using pulseaudio

Posted: 05 Apr 2013 11:32
by lnp
same problem on ubuntu 12.10 vlc 2.0.5. alsa works fine