Audio queue progressively runs empty for videos with AAC audio
#1
Greetz!

After update to XBMC 10.1 I'm experiencing the following problem.

In MP4 files that use AAC as audio codec, the audio queue (AQ entry in codec info) runs more and more empty, the further I get into the video.

I.e. when the video starts, the AQ flickers between 95 and 99%. It continuously decreases and after a few minutes it's down to 45-50%. After some more minutes it reaches 0% and the video starts stuttering.

Log then shows:

Code:
19:08:20 T:2600 M:337170432 WARNING: CWin32DirectSound::GetSpace - buffer underrun - W:49920, P:44160, O:49536.
19:08:20 T:2600 M:337174528 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
19:08:20 T:2600 M:337162240 WARNING: CWin32DirectSound::GetSpace - buffer underrun - W:99840, P:94080, O:99456.
19:08:20 T:2600 M:337170432 WARNING: CWin32DirectSound::GetSpace - buffer underrun - W:151680, P:145920, O:149376.
19:08:21 T:2600 M:337133568 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available

It does not matter if I watch the video continuously, or seek back and forth. The further I jump or watch into the video, the more the queue runs empty.

I'm not certain since when this problem exists, since I've not been watching the files in question for quite a while. But I'm sure it did not exist before.

One of the files in question has H.264 video and AAC audio (it's a PC game speedrun video). Other files with e.g. MP3 codec run all okay.

Further data about my system you find in the signature. Any ideas what could cause this problem?
Kind regards, Frank

Kodi: LibreELEC Beta
HTPC: Raspberry Pi 2 (Model B)
TV: Toshiba 47"
NAS: Debian Jessie x64 (Gigabyte GA-D510UD), HDD 3x1.5 TB + 1x2 TB (SnapRAID, MergerFS)
Reply
#2
Additional info: The problem does not occur with all AAC/H.264 videos, only with some.

It does not matter if I turn DXVA2, framerate sync/adaption on or off.
Kind regards, Frank

Kodi: LibreELEC Beta
HTPC: Raspberry Pi 2 (Model B)
TV: Toshiba 47"
NAS: Debian Jessie x64 (Gigabyte GA-D510UD), HDD 3x1.5 TB + 1x2 TB (SnapRAID, MergerFS)
Reply
#3
Bump, and new info.

Any idea about this, anyone?

I did some further testing. The example file whose MediaInfo I posted below works perfectly on a fresh install of XBMC 9.11.

But on a fresh install of XBMC 10.1 on the same system it exhibits the described problem: The audio queue runs empty, the further I get into the video. No matter if I seek or watch normally.

I tested it with fresh installs on two independent systems.

Please, take a look at this. This problem applies to most of my downloaded game videos, so I can't watch them with XBMC anymore. Which sucks. Sad

Code:
General
Complete name                    : V:\Video\Game Videos\Longplays\Amiga\Grand Monster Slam.mp4
Format                           : MPEG-4
Format profile                   : Base Media
Codec ID                         : isom
File size                        : 64.0 MiB
Duration                         : 34mn 5s
Overall bit rate                 : 262 Kbps
Encoded date                     : UTC 2006-07-24 09:44:24
Tagged date                      : UTC 2006-07-24 09:44:24

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : [email protected]
Format settings, CABAC           : Yes
Format settings, ReFrames        : 6 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 34mn 5s
Bit rate mode                    : Variable
Bit rate                         : 237 Kbps
Maximum bit rate                 : 1 396 Kbps
Width                            : 640 pixels
Height                           : 400 pixels
Display aspect ratio             : 1.600
Frame rate mode                  : Constant
Frame rate                       : 50.000 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.018
Stream size                      : 57.7 MiB (90%)
Writing library                  : x264 core 48 svn-537
Encoding settings                : cabac=1 / ref=3 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=6 / brdo=1 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / chroma_qp_offset=0 / slices=1 / nr=0 / decimate=1 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=500 / keyint_min=50 / scenecut=40 / rc=crf / crf=30 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=5 / qpmax=30 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30
Encoded date                     : UTC 2006-07-24 08:23:19
Tagged date                      : UTC 2006-07-24 09:44:29

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : HE-AACv2 / HE-AAC / LC
Codec ID                         : 40
Duration                         : 34mn 5s
Bit rate mode                    : Variable
Bit rate                         : 20.2 Kbps
Maximum bit rate                 : 26.4 Kbps
Channel(s)                       : 2 channels / 1 channel / 1 channel
Channel positions                : Front: L R / Front: C / Front: C
Sampling rate                    : 44.1 KHz / 44.1 KHz / 22.05 KHz
Compression mode                 : Lossy
Stream size                      : 4.92 MiB (8%)
Language                         : English
Encoded date                     : UTC 2006-07-24 09:44:29
Tagged date                      : UTC 2006-07-24 09:44:29
Kind regards, Frank

Kodi: LibreELEC Beta
HTPC: Raspberry Pi 2 (Model B)
TV: Toshiba 47"
NAS: Debian Jessie x64 (Gigabyte GA-D510UD), HDD 3x1.5 TB + 1x2 TB (SnapRAID, MergerFS)
Reply
#4
Here's a debug log of a playback attempt with 10.1.

I load the video, seek forward a bit and then let it run for about a minute until the audio queue runs empty and the thing starts stuttering.

http://pastebin.com/T6yEjBaJ
Kind regards, Frank

Kodi: LibreELEC Beta
HTPC: Raspberry Pi 2 (Model B)
TV: Toshiba 47"
NAS: Debian Jessie x64 (Gigabyte GA-D510UD), HDD 3x1.5 TB + 1x2 TB (SnapRAID, MergerFS)
Reply
#5
Did anyone resolve this issue? I see a lot of different post on CWin32DirectSound::GetSpace - buffer underrun, but I did not see a solution anywhere.

My Log:
<deleted>
Reply
#6
Please don't post logs in the forum. Copy and paste the log to http://pastebin.com/ and post the link that pastebin gives you.

Also remember to enable debug logging from System settings, System, Debugging.

JR
Reply
#7
Hi,

I seem to be having a related issue. For me audio starts stuttering immediately, but the logs seem similar:

http://pastebin.com/wYCewsTm

The above log was taken just now with debug logging on

Edit: Also to expand slightly, the video plays back with no issues on VLC on the same system
Reply
#8
I recall someone reporting a similar problem recently, and it turned out to be something in the audio settings. I think it might have been due to enabling or disabling the "DTS capable receiver" setting.

Sorry this is a bit vague, but try fiddling with the audio settings and see if that helps.

JR
Reply
#9
Hi,

Thanks for the fast response. "DTS capable receiver" was indeed enabled. However I fiddled around with that and the AC3 option in different configurations, but was not able to get it working. Attached is a new log with AC3 on and DTS off:

http://pastebin.com/1SCUztvb

Thanks again for the help

Edit: As the OP noted, XBMC 9.11 (on the same system again) plays the files fine
Reply

Logout Mark Read Team Forum Stats Members Help
Audio queue progressively runs empty for videos with AAC audio0