out-of-sync a/v using pulseaudio

*nix specific usage questions
tomyankashing
New Cone
New Cone
Posts: 3
Joined: 15 Jun 2011 14:57

out-of-sync a/v using pulseaudio

Postby tomyankashing » 15 Jun 2011 15:49

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 15 Jun 2011 16:27

This is a known issue with the PulseAudio plugin. No volunteers to fix it though.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

tomyankashing
New Cone
New Cone
Posts: 3
Joined: 15 Jun 2011 14:57

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

Postby tomyankashing » 16 Jun 2011 06:22

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:

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 16 Jun 2011 08:41

In VLC 1.1.9, PulseAudio output leaks memory like hell and crashes the whole system. Hardly better.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

tomyankashing
New Cone
New Cone
Posts: 3
Joined: 15 Jun 2011 14:57

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

Postby tomyankashing » 16 Jun 2011 11:28

what a pity
hope someone could fix it soon

WH4K
Blank Cone
Blank Cone
Posts: 11
Joined: 04 Mar 2011 13:33

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

Postby WH4K » 08 Jul 2011 18:17

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.

Michele
Blank Cone
Blank Cone
Posts: 89
Joined: 23 May 2010 20:23

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

Postby Michele » 15 Jul 2011 14:45

So the only thing to do is using VlC 1.1.9 until the bug will be fixed.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 15 Jul 2011 16:55

...if you don't mind your system crashing.

Otherwise, this works a lot better: 'pasuspender vlc -A alsa'
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Michele
Blank Cone
Blank Cone
Posts: 89
Joined: 23 May 2010 20:23

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

Postby Michele » 15 Jul 2011 21:32

...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.

roi_shoko
New Cone
New Cone
Posts: 4
Joined: 14 Jul 2011 11:29

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

Postby roi_shoko » 17 Jul 2011 10:25

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

Michele
Blank Cone
Blank Cone
Posts: 89
Joined: 23 May 2010 20:23

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

Postby Michele » 17 Jul 2011 11:44

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.

roi_shoko
New Cone
New Cone
Posts: 4
Joined: 14 Jul 2011 11:29

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

Postby roi_shoko » 17 Jul 2011 13:02

Hi,

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

Try it.

Cheers,

Roi

sal22
New Cone
New Cone
Posts: 2
Joined: 19 Jul 2011 05:59

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

Postby sal22 » 19 Jul 2011 06:07

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 19 Jul 2011 08:30

This is far simpler:

Code: Select all

pasuspender vlc -A alsa
(pulseaudio-utils must be installed)
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

AndreD
New Cone
New Cone
Posts: 7
Joined: 12 Oct 2008 17:09

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

Postby AndreD » 22 Jul 2011 21:06

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 23 Jul 2011 10:32

Easier said than done.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Bill_MI
Blank Cone
Blank Cone
Posts: 12
Joined: 22 Jul 2010 12:26
VLC version: 2.0.0
Operating System: Linux

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

Postby Bill_MI » 28 Jul 2011 12:47

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.
Bill In Michigan

Michele
Blank Cone
Blank Cone
Posts: 89
Joined: 23 May 2010 20:23

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

Postby Michele » 28 Jul 2011 13:20

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 28 Jul 2011 14:23

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jon4t2
New Cone
New Cone
Posts: 4
Joined: 04 Apr 2011 14:18
VLC version: 1.1.11
Operating System: WinXP & Linux
Location: Kent, Ohio, U.S.A.

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

Postby jon4t2 » 29 Sep 2011 16:03

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 29 Sep 2011 18:46

This all should be fixed in VLC 1.1.12 by now. Alternative, turning off tsched in pulse.conf can work around the problem.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Bill_MI
Blank Cone
Blank Cone
Posts: 12
Joined: 22 Jul 2010 12:26
VLC version: 2.0.0
Operating System: Linux

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

Postby Bill_MI » 29 Nov 2011 02:49

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.
Bill In Michigan

lnp
New Cone
New Cone
Posts: 1
Joined: 05 Apr 2013 11:25

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

Postby lnp » 05 Apr 2013 11:32

same problem on ubuntu 12.10 vlc 2.0.5. alsa works fine


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests