audio stutters or stops playing after seeking

Bug #1319233 reported by Mike Doherty on 2014-05-14
162
This bug affects 35 people
Affects Status Importance Assigned to Milestone
vlc (Ubuntu)
High
Unassigned

Bug Description

On many videos, vlc stops playing audio or plays stuttering audio after seeking. This is a regression from 13.10. With --verbose=2, I see messages like:

$ vlc --verbose=2 test.wmv 2>&1 | grep audio
[0x1a91048] main playlist debug: creating audio output
[0x195d948] main audio output debug: looking for audio output module matching "any": 6 candidates
[0x195d948] pulse audio output debug: using library version 4.0.0
[0x195d948] pulse audio output debug: (compiled with version 4.0.0, protocol 28)
[0x195d948] pulse audio output debug: connected locally to unix:/run/user/1000/pulse/native as client #257
[0x195d948] pulse audio output debug: using protocol 28, server protocol 28
[0x195d948] main audio output debug: using audio output module "pulse"
[0x1a91048] main playlist debug: keeping audio output
[0x195d948] pulse audio output debug: adding sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
[0x7f72a0c01768] asf demux debug: added new audio stream(codec:0x161,ID:2)
[0x1a91048] main playlist debug: reusing audio output
[0x195d948] pulse audio output debug: using stereo channel map
[0x195d948] pulse audio output debug: changing sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
[0x195d948] pulse audio output debug: changed buffer metrics: maxlength=4194304, tlength=42336, prebuf=0, minreq=14112
[0x195d948] pulse audio output debug: connected to sink alsa_output.pci-0000_00_1b.0.analog-stereo
[0x195d948] pulse audio output debug: base volume: 65536
[0x195d948] main audio output debug: output 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes
[0x7f7294030a18] main volume debug: looking for audio volume module matching "any": 2 candidates
[0x7f7294030a18] main volume debug: using audio volume module "float_mixer"
[0x195d948] main audio output debug: input 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
[0x7f7294032b78] main audio filter debug: looking for audio filter module matching "scaletempo": 14 candidates
[0x7f7294032b78] scaletempo audio filter debug: format: 44100 rate, 2 nch, 4 bps, fl32
[0x7f7294032b78] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search
[0x7f7294032b78] scaletempo audio filter debug: 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode
[0x7f7294032b78] main audio filter debug: using audio filter module "scaletempo"
[0x195d948] main audio output debug: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
[0x195d948] main audio output debug: conversion pipeline complete
[0x195d948] main audio output debug: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
[0x195d948] main audio output debug: conversion pipeline complete
[0x7f7294039d48] main audio resampler debug: looking for audio resampler module matching "any": 3 candidates
[0x7f7294039d48] main audio resampler debug: using audio resampler module "samplerate"
[0x7f72a0c1cfe8] main decoder debug: End of audio preroll
[0x195d948] pulse audio output debug: cannot synchronize start
[0x195d948] pulse audio output debug: deferring start (412345 us)
[0x195d948] pulse audio output warning: starting late (-17127 us)
[0x195d948] pulse audio output debug: started
[0x195d948] pulse audio output debug: changing sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
[0x195d948] main audio output warning: playback way too early (-398592): playing silence
[0x195d948] main audio output debug: inserting 19132 zeroes
[0x195d948] pulse audio output debug: underflow
[0x7f72a0c1cfe8] main decoder debug: End of audio preroll
[0x195d948] pulse audio output debug: underflow
[0x195d948] pulse audio output debug: underflow
[0x7f72a0c1cfe8] main decoder debug: End of audio preroll
[0x195d948] pulse audio output debug: underflow
[0x195d948] pulse audio output debug: underflow
[0x195d948] pulse audio output debug: underflow
[0x7f7294039d48] main audio resampler debug: removing module "samplerate"
[0x7f7294032b78] main audio filter debug: removing module "scaletempo"
[0x1a91048] main playlist debug: keeping audio output
[0x195d948] main audio output debug: removing module "pulse"

Other video players, like totem, have no problem playing this file. Nor did vlc on Ubuntu 13.10.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: vlc 2.1.2-2build2
ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Tue May 13 23:27:01 2014
InstallationDate: Installed on 2013-01-12 (486 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
SourcePackage: vlc
UpgradeStatus: Upgraded to trusty on 2014-05-08 (5 days ago)

Mike Doherty (doherty) wrote :
tags: added: regression-release
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vlc (Ubuntu):
status: New → Confirmed
Simon P. (simpre) wrote :

Got the same problem under Ubuntu 14.04, my vlc version is 2.1.4

sander (s-devrieze) wrote :

Confirmed. PPA repository contains the same bug. When pausing a DVB stream and then fast-forwarding, the audio is gone, but when you then select another playlist item, the audio is back again.

Rémi Denis-Courmont (rdenis) wrote :

Are you sure the problem is not coming from the PulseAudio update rather than VLC? From the log, it just seems PulseAudio is discarding all audio that VLC sends.

Rémi Denis-Courmont (rdenis) wrote :

BTW, if you can reproduce the bug reliably, you may want to try remove the PA_STREAM_FIX_RATE flag from the VLC PulseAudio plugin because of https://bugs.freedesktop.org/show_bug.cgi?id=75954

Jens Herrmann (bugs-u) wrote :

I filed a new bug report for this bug today not knowing that it existed already. Take a look at my somewhat more detailed description and the example file I provided (https://bugs.launchpad.net/bugs/1346256).
When I start from the terminal with the --verbose=2 option and skip to position 02m14s I always get the error:
"mpgatofixed32 audio converter error: libmad error: bad main_data_begin pointer"

This bug might just be a duplicate of Bug #494656 - "Audio drift while playing few movies in VLC" with contains the same error message. What do you think?

Steve Newcomb (srn-coolheads) wrote :

I'm playing an off-air recording (the Newshour). The video freezes, then the audio stops, then the video restarts, but there's no audio. If I move the cursor on the timeline at the bottom of the screen and click it, the audio and video both restart there. The same thing occurs again at the same points in the recording. It looks to me like vlc is not restarting its audio playback automatically after encountering and passing over a defect in the transmission stream. It does restart its video playback automatically, though.
Off-air transmission streams contain many flaws, of course. I'm running 14.04 Kubuntu with vlc 2.1.4.

Changed in vlc (Ubuntu):
importance: Undecided → High
Rémi Denis-Courmont (rdenis) wrote :

It still looks to me like the PulseAudio bug as noted in comment 6.

snurfle (snurfle) wrote :

I did a fresh install of 14.04.1 in December, and have this issue as well. I did not have any issue with Xubuntu 14.10.

I am still having other sound-related issues though; Ubuntu randomly jumps from HDMI to Analog to No sound at each reboot, but I assumed the VLC error was just an offshoot of that.

But, it sounds like this is a different bug altogether.

Just wanted to post this as another data point.

Ivan Borisov (borisov87) wrote :

Have same problem with many movies from yify site. Videos are mp4 format. When seeking - audio lose. I use kubuntu 14.10 and vlc 2.2.0. I have those problem on my home pc and on my work pc - so may be problem is global.

wensveen (wensveen) wrote :

This does indeed look PulseAudio-related. I'm able to reproduce with the default settings, which outputs to PA, but when I select the ALSA output module and a proper (hardware) device everything is fine.

It seems to me that there's a buffer issue, especially because of these lines:
[0x195d948] main audio output warning: playback way too early (-398592): playing silence
[0x195d948] main audio output debug: inserting 19132 zeroes

Misaki (myjunkmail311006) wrote :

This might be related to timing. I'm just saying what I concluded from looking at debug before; when I looked at it more recently, it wasn't obvious which error messages related to audio were relevant or I didn't look at enough of the debug output.

If a video is decoded quickly, audio won't stop playing. If it takes too long, there is an error message in debug and audio will stop working. So the way to replicate it, as suggested by the duplicate bug report, is to seek to the end of a long group-of-pictures in a video, just before a keyframe.

While switching to ALSA audio output does prevent the problem, it seems to me that there is a small amount of static as audio starts playing again if using the PulseAudio Sound Server as ALSA's output.

If using a hardware device, VLC can play files fine by itself, but conflicts with other attempts to use the output device. So if you leave VLC open, and try to play a web video, the video will freeze after a few seconds because it's waiting for audio to start. For me at least, when I start playing a Flash video in Firefox, in my Sound settings (Ubuntu), 'ALSA plug-in [plugin-container' starts up. Similarly, if Flash is already using the audio, VLC will give an error message in the UI ("device busy") and audio won't play.

I don't notice this burst of static when just using Pulseaudio as output, but it has problems with seeking as described in this bug report.

I also only encountered this problem after upgrading, though for me it was from Ubuntu 12.04 to 14.10 and I'm not sure what my VLC settings were before, probably just default. I don't get stuttering, the audio just turns off, and only turns back on if another attempt to seek within the video is successful.

The workaround is to pause the video just before seeking, and only start playing again once the video decoder has finished or almost finished catching up. But this isn't at all obvious; at first I thought that losing audio was due to problems with handling the VP9 or WebM codecs/formats.

s7ian (s7ian) wrote :

Confirmed using 14.04, VLC 2.1.16. Audio disappear using seek. Sound playing again using "audio -> audio track -> disable" and then choosing audio source again. Does not occur running VLC from terminal it seems.

jon (jnektar) wrote :

Linux Lite 2.4 (based on Ubuntu 14.04.2 LTS) with VLC 2.1.16 has the same problem running pulseaudio. audio/audio track/disable doesn't rectify. Running from terminal has same problem.

#13 workaround works though. Pause, move to new video section, wait for picture catch up, then and only then play.

tags: added: wily

Should be fixed as of 2.2.2-1

Changed in vlc (Ubuntu):
status: Confirmed → Fix Released

I use VLCJ 3.0.1, Plattform 3.5.2 and JNA 3.5.2.

I create my mediaplayer and equalizer. When i change any EQ-band, the gain from the band getting to max and i can't set lower. When i set the gain to 20 or -20 then the gain is set to min.... I don't understand this...

When i enable oder disable the equalizer, i get this message: [00007fda68008378] mpgatofixed32 audio converter error: libmad error: bad main_data_begin pointer

I use the vlc 2.2.1 player under Ubuntu 14.10...

I hope anybody can help me please!

Thanks...

Marco Pedrazzi (pedrazzi2009) wrote :

nobody have a solution???

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.