Broken Audio with "CDVDPlayerAudio:: Discontinuty" errors in log
#1
Hi all, after having XBMC working for ~2 months perfectly, since I upgraded to SVN (after a reinstall / distribution switch), I'm having problems with playback of some of my videos.

Basically, I have around 20 bluray backups, all with FLAC 5.1 audio and h.264/vc-1/mpeg2 video. I have XBMC outputting audio over a HDMI port (Asus P5N7A-VM motherboard - there's a thread on setting it up). And all was working perfectly till an upgrade to SVN head.

About 1/5 of my movies play perfectly (i.e. as they used to). However now when trying to play the rest I get complete audio corruption (sounds like white noise), and the video framerate slows to around 14fps (presumably because audio is the timebase, and it's fubarred).

If I look in the xbmc.log, I can see hundreds of:

18:43:36 T:2688564112 M: 90009600 WARNING: CDVDMessageQueue(video)::Get - retrieved last data packet of queue
18:43:36 T:2680171408 M: 90009600 DEBUG: CDVDPlayerAudio:: Discontinuty - was:1663572728.922333, should be:1663487333.333333, error:-85395.589000
18:43:36 T:2680171408 M: 90009600 DEBUG: CDVDPlayerAudio:: Discontinuty - was:1663658579.777333, should be:1663572333.333333, error:-86246.444000
18:43:37 T:2680171408 M: 90009600 DEBUG: CDVDPlayerAudio:: Discontinuty - was:1663742446.663333, should be:1663658333.333333, error:-84113.330000
18:43:37 T:2680171408 M: 90009600 DEBUG: CDVDPlayerAudio:: Discontinuty - was:1663829269.360333, should be:1663743333.333333, error:-85936.027000

Full log here.

This problem is 100% reproducible, on two completely unique installs on two different distributions (arch linux / ubuntu jaunty). Using SVN rev. 17652 the problem does not exist.

Also, if I turn off '5.1 to stereo downmix', it causes audio playback to fail (with an onscreen error, as the hdmi port is only 2-channel), however after that video playback is fine. Seems to me something like the flac 5.1 is causing dvdplayers audio processing to bork. I think some of the FLAC files are 24bit (as opposed to 16bit).

I can't see any pattern to which files will/won't play, they're all pretty much the same (5.1 FLAC (16/24bit), h.264/vc-1/mpeg2 video 1920x1080, in a MKV container). It _could_ be the 16/24bit audio files, as I don't know which are 24bit or 16bit).

Anybody have any ideas/suffering the same problems?

Thanks in advance, Xanium
Reply
#2
I've seen it too but not related to FLAC. I see it during playback of AAC audio in a video file.

Ubuntu Jaunty alpha, ALSA 1.0.19, and Intel HDA.
Reply
#3
i'm having the same problem with the newest svn.

Code:
10:54:06 T:2606689168 M:283054080 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
10:54:06 T:2606689168 M:283054080 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
10:54:06 T:2606689168 M:282984448   ERROR: GetDelay - snd_pcm_delay, alsa error: -32 - Broken pipe
10:54:06 T:2606689168 M:282984448   DEBUG: CDVDPlayerAudio:: Discontinuty - was:983221847.046422, should be:983247033.608114, error:25186.561693
10:54:06 T:2606689168 M:282984448 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
10:54:06 T:2606689168 M:282984448 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
10:54:06 T:2606689168 M:282984448   ERROR: GetDelay - snd_pcm_delay, alsa error: -32 - Broken pipe
10:54:06 T:2606689168 M:282984448   DEBUG: CDVDPlayerAudio:: Discontinuty - was:983441936.389114, should be:983417043.613114, error:-24892.776000
10:54:06 T:2606689168 M:282984448 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
10:54:06 T:2606689168 M:282984448   ERROR: GetDelay - snd_pcm_delay, alsa error: -32 - Broken pipe

Code:
General
Complete name                    : E:\data\geo.mkv
Format                           : Matroska
File size                        : 12.0 GiB
Duration                         : 2h 13mn
Overall bit rate                 : 12.9 Mbps
Movie name                       : GeoN
Encoded date                     : UTC 2007-09-18 13:00:51
Writing application              : mkvmerge v2.0.2 ('You're My Flame') built on Jun 25 2007 12:41:14
Writing library                  : libebml v0.7.7 + libmatroska v0.8.1
Cover                            : Yes / Yes / Yes / Yes / Yes

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : [email protected]
Format settings, CABAC           : Yes
Format settings, ReFrames        : 9 frames
Muxing mode                      : Container [email protected]
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 2h 13mn
Bit rate                         : 9 900 Kbps
Nominal bit rate                 : 10.2 Mbps
Width                            : 1 920 pixels
Height                           : 816 pixels
Display aspect ratio             : 2.35
Frame rate                       : 23.976 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.264
Stream size                      : 9.23 GiB (77%)
Title                            : 1920x816, x264 - 10200kbit/s (HDTracker.ru)
Writing library                  : x264 core 56
Encoding settings                : cabac=1 / ref=6 / deblock=1:-4:-4 / analyse=0x3:0x133 / me=umh / hadamard=0 / subme=7 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=2 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=0 / mbaff=0 / bframes=4 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=10200 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / zones=182700,192007,b=0.07 / aq=1:0.5:14.0
Language                         : English

Audio #1
ID                               : 2
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : A_AC3
Duration                         : 2h 13mn
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Stream size                      : 367 MiB (3%)
Title                            : AC3, 6ch 384kbps
Language                         : English

Audio #2
ID                               : 3
Format                           : DTS
Format/Info                      : Digital Theater Systems
Codec ID                         : A_DTS
Duration                         : 2h 13mn
Bit rate mode                    : Constant
Bit rate                         : 768 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 24 bits
Stream size                      : 734 MiB (6%)
Title                            : DTS 5.1, 768kbps
Language                         : English

Audio #3
ID                               : 4
Format                           : DTS
Format/Info                      : Digital Theater Systems
Codec ID                         : A_DTS
Duration                         : 2h 13mn
Bit rate mode                    : Constant
Bit rate                         : 1 536 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 1.43 GiB (12%)
Title                            : DTS 5.1, 1536kbps
Language                         : English

without stereo downmix it doesnt work at all. And if i turn it on, there are issuies with every audio track. Sometimes audio stops for a random amount of time, sometimes it isnt in sync, sometimes i get only noise with digital audio (switching to analog helps here).
Pretty much every movie in my library with ac3/dts audio track has some sort of issue.

Code:
Ubuntu Jaunty 9.04

aplay -L
front:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    Front speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, NVIDIA HDMI
    HDMI Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)
Reply
#4
same issue here but for original dvd's
video is perfect, no audio
mp3's and avi movies are fine,video and audio
Reply
#5
I encountered somewhat similar issues (as the first poster), see ticket 6648. In spite of the title, audio is not fine - I just can't edit the title at this point.

In my case, I've determined that r20202 broke any video that doesn't use passthrough audio. For example, if I enable AC3 passthrough, any .mkv with AC3 plays fine, but if I disable it (and therefore audio processing takes place in XBMC rather than the receiver) I get slow video and choppy audio.

For the moment, I'm using r20201 and sporadically testing newer SVNs in the hopes that they'll fix what ails me. You may want to add a comment to my ticket if you feel it's similar, or create a new one. It's nice to know that it's not just my system that seems affected by this.
Reply
#6
Hi,

Sorry for bringing up such an old thread, but I'm having the exact same issue.

Here is the relevant portion of my log:

Code:
20:42:31 T:2822617968 M:2752733184   ERROR: GetDelay - snd_pcm_delay, alsa error: -32 - Broken pipe
20:42:31 T:2822617968 M:2752733184   DEBUG: CALSADirectSound::AddPackets - buffer underun (tried to write 1024 frames)
20:42:31 T:2822617968 M:2752733184   DEBUG: CALSADirectSound::AddPackets - buffer underun (tried to write 1024 frames)
20:42:31 T:2822617968 M:2752733184   DEBUG: CDVDPlayerAudio:: Discontinuty - was:32664785.247501, should be:32815381.003000, error:150595.755499
20:42:31 T:2822617968 M:2752733184   DEBUG: CDVDPlayerAudio:: Discontinuty - was:32857895.265000, should be:33093671.227214, error:235775.962214

I'm running gentoo, with XBMC-9.11-r4

My CPU is an Atom N280, 3GB RAM, and I have Ion.

The video doing this is a plain old XviD. Funny thing, when playing H264 using VDPAU, this does not happen at all.

This happens completely random for any XviD file that previously worked OK. When it happens, it keeps happening for all videos.

Please let me know of anymore info you need from me.

Thanks for your help!
Reply
#7
I have the same issue, don't think it's on specific types of video but I know for sure it happens on regular xvid-files:

Code:
08:25:56 T:2788076432 M:1438748672 WARNING: CALSADirectSound::GetSpace - get space failed. err: -32 (Broken pipe)
08:25:56 T:3031377808 M:1438748672   DEBUG: ffmpeg[B4AF2790]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.
08:25:57 T:2788076432 M:1438756864   DEBUG: Previous line repeats 20 times.
08:25:57 T:2788076432 M:1438756864   DEBUG: CDVDPlayerAudio:: Discontinuity - was:2219901948.856199, should be:2219833473.941620, error:-68474.914579
08:25:57 T:3031377808 M:1438756864   DEBUG: ffmpeg[B4AF2790]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.
08:25:58 T:2788076432 M:1438760960   DEBUG: Previous line repeats 22 times.
08:25:58 T:2788076432 M:1438760960   DEBUG: CDVDPlayerAudio:: Discontinuity - was:2220876182.241621, should be:2220887247.497401, error:11065.255780

Ubuntu Jaunty
Intel Atom 330 (ASRock 330)
alsactl version 1.0.18
Running on SVN PPA

Code:
Starting XBMC, Platform: Linux (Ubuntu 9.04, 2.6.28-19-generic i686). Built on Aug 17 2010 (SVN:32869)
Reply
#8
No tips for solving this?
Reply
#9
Hi ,
I have the same issues on my atv. I've upgraded all possible drivers but no effect. It seems that a lot of dvd iso files, but also hd movies have audio issues, comparable to what is writen here. Evere 10 minutes or sometimes even more often these lines are outputed and the broken pipe error causes the movie to stall a fraction of a second.
Reply
#10
no succes so far
Reply
#11
I think this problem started after a kernel upgrade. Any way of solving it without having to reinstall the entire system?
Reply
#12
Same issue here on XBMC Live Dharma 3

Using HDMI audio and video output / ATI 4200 on Asus M4785G

Shocking audio stutter / video freezing

Many discontinuity errors in log file when playing any media type.
Reply
#13
I've noticed it with my mkvs as well, on both 2.0 and 5.1/6.1 FLAC. Hopefully it's similar to the DTS discontinuity problem that was recently resolved, and a fix is not far away.
Reply
#14
"CDVDPlayerAudio:: Discontinuty", this was accompained with "avdecode drops packet incomplete packet consumed" and FPS drop into the 14-19 range.
In my case, Lucid 10.04.2 with XBMC, the errors went away after I disabled all additional audio processing.
I had setup a virtual audio device to send the audio to both HDMI and analog stereo output, plus boost volume on downmix. I have only TV speakers, no 5.1 speaker audio system.

I suspected a CPU utilization issue after I noticed that the video would stutter/drop frames especially with my higher definition content and, if there was a lot of audio content going on files with more than 2 audio channels in them.
I disabled the Pulseaudio additional virtual device (set all to defaults), and set XBMC to just send the audio to only HDMI, no volume boosting.

Rumors put the blame to Pulseaudio spiking the CPU. I been trying to solve this riddle long enough to want to keep messing with it. Let me watch tv for now!
Reply

Logout Mark Read Team Forum Stats Members Help
Broken Audio with "CDVDPlayerAudio:: Discontinuty" errors in log0