Kodi Community Forum

Full Version: Some video files play back too fast
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I had an issue where some video files were playing back too fast. Further inspection showed that the files causing problems were ones that audio at a sample rate besides 48KHz. I am using a coax SPDIF cable to output audio to my receiver.

Now, I've already fixed the issue, I'm just trying to gain some insight on what was going wrong in the first place for my own understanding.

Here's what was working:
1. Video files with AC3/DTS tracks using passthrough
2. Video files with 48KHz audio (regardless of codec)
3. Audio files with 44.1KHz audio

What wasn't working:
1. Video files with non-48KHz audio (e.g. 24KHz or 44.1KHz) -- these played back too fast, it seemed like it was playing back fast enough to equal 48KHz audio so 24KHz files played back at 2x and 44.1KHz at 1.08x speed.

I initially tried setting the following options in my ~/.xbmc/userdata/advancedsettings.xml file:


This had no effect.

Next, I tried creating a ~/.asoundrc file with the following:

pcm.spdif48 {
        type plug
        slave {
                rate 48000
                pcm "spdif"

And then set my non-passthrough audio device to "spdif48" (passthrough was still set to "iec958"). This did work.

The things I'm confused by:
1. Why would 44.1KHz video files cause a problem but 44.1KHz MP3 files play back fine?
2. Why didn't the advancedsettings.xml file work? Does the file and path look OK? I found that snippet in this thread.

Anyone know the answers to these questions? I'm just trying to improve my understanding of how the sound subsystem works in XBMC.

While I do not have the answer to your question, I wanted to say thanks for solving the problem I was facing. I also used the .asoundrc solution, though must admit I skipped the XML method.