Kodi Community Forum

Full Version: Audio speed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I am using the latest ubuntu and xbmc.

Everything works fine, but the audio speed is in many files wrong.
way too fast, sounds like a chipmunk Smile

NOrmally i would say the hardware can play it right, because in VLC i have no such issues.

I even have this problem when killing pulseaudio completely.

Any ideas ?

I want to use xbmc again Smile

Thnx in advance

DiGiT
Many? How many? What codecs? Music or videos? Why didn't you pastebin a debug log and sample file? If you want help you're going to have to provide specific and detailed info about the problem. A comparison with VLC is not one we care about, try the files with ffplay, preferably one built from our ffmpeg sources. It's not like there's a "randomly play audio at high speed" setting we hide away to screw with people.
i will provide detailed logs later this evening!
maybe you can see any problems within those logs.

thought maybe its a known problem Smile
Sorry for the delay...

here is a (hopefully detailed) log of attempting to play a video file which causes this issue.

http://pastebin.com/m449c891b


If needed i could cut a small part out of the 1gb file to provide as a sample if the log file does not help.

As stated before: only some files are presenting this behaviour. Most of my files (regardless of mkv, avi or any codecs in there) play well.

But some sounds like chipmunks... the voice and sound is really pitched up.

Maybe someone has an idea.

I think the lines with:

DEBUG: CDVDPlayerAudio:: Discontinuty - was:2378388.812866, should be:2407281.761258, error:28892.948392

Are the problem. Compared to a log playing a "good" file those lines do not occur.

(Soundcard is a Audigy 4 SE)

Regards and sorry for the first "blind" post.
Its because you have changed the audio device to iec958, do you use passthrough?
And its locked to 48000 which the video you are trying to play arent. This is the cause for chipmunk. audio in 44100 is played in 48000
Thnx for the fast reply.

Those are my audio settings:

<ac3passthrough>true</ac3passthrough>
<audiodevice>iec958</audiodevice>
<dtspassthrough>true</dtspassthrough>
<mode>1</mode>
<passthroughdevice>iec958</passthroughdevice>


Works fine on most videos, even with DTS.

Is there a way to fix my problem ? Maybe with some config changes
Can i "unlock" the 48000 setting ?
The lock of 48000 is due to passthrough, Its because s/pdif can only play at a certain sample rate. But Im no expert on this and Im sure someone else could say more why its needed Smile
anyhow, if you set up the sound through alsamixer and set XBMC to default Alsa will resample the audio and make it transparent. this is the part XBMC is missing and we are working abit on trying to achieve that in the next point release.

The idea is to add a smallish DSP chain which can be set to resample when there is a passthrough device.
On another note this is why paplayer should work already because it always resample to 48000, which is gonna be lifted in next point release aswell. The goal is to have care for this before atlantis+1 atleast.

Cheers,
Tobias
great to see that you are working on the problem! thnx for that Smile


i had many problems with alsa in past days...so i was very happy with the "passthrough thing"... even dts worked out of the box,hehe

i think waiting for the next point release is a good option for me Smile
At the moment the problem occurs only on a small amount of my files..

Maybe i have some spare time tomorrow and will test the "default" setting (which will use alsa as i understand)...
but i think that was my first setting and i did not get any sound out of that setting anyway.
I'm having the same problem with a video. XBMC plays the video fast and the sound is pitched up correspondingly.
XBMC shows audio details as pcm_s16le, 32000 Hz, stereo, 1024 Kb/s

My XBMC audio settings are default (goes via HDMI to TV)/iec958 (via SPDF to stereo).

There is a suggestion in this thread that ALSA should resample the audio automatically, but that doesn't seem to work. My .asoundrc is:
Code:
pcm.!default
{
type hw
card 1
device 3
}

Any suggestions / help appreciated!
i had the problem with fast video only when pulse audio was on.
now i kill the pulse audio via script,then start xbmc and restart pulseaudio afterwards.

The video plays fine now. And the pitching audio is only a problem of a few files.
digit79 Wrote:i had the problem with fast video only when pulse audio was on.

Sorry - I should have mentioned that this did NOT work for me. The problem occurs even after I "sudo killall pulseaudio"

Most videos play fine, but this particular one has 32 kHz audio and it's like watching chipmunks...
i will experiment with some settings this evening.
Maybe i can try the mentioned alsa way... but i think i had no luck with that before.
just tried all settings... i cant get rid of that problem.

if i change from iec958 to default i get no sound at all at that movie.
And with iec958 i get the chipmunked version.

i think i will have to wait for the next point release.

Or does anyone know how to setup xbmc, alsa and pulseaudio correctly to fix this issue ? (to resample other values as 48000 to the mentioned value...)


just to wrap up:

as i understand my problem is that i use passthrough for all of my audio (ac3 and dts passthrough set to TRUE).
Both audi device settings are set to "ice958").
Works fine for all files with audio in 48000. When playing a file with a different audio source (the problematic file has 42000) that source is beeing sent in 48000 to the external reciever and therefore "pitched up".

So i have to find a solution to send "non standard audio" to an internal alsa component to have it upsampled and then beeing sent to mey reciever.
Right ?

The problem is: all other settings in my guisettings.xml for audio just provide more problems and less files could be played well Smile
digit79 Wrote:as i understand my problem is that i use passthrough for all of my audio (ac3 and dts passthrough set to TRUE).
Both audi device settings are set to "ice958").

I have both audio outputs as their defaults (analog to 'default', digital passthrough to 'iec958' with both DTS and AC3), but still have this problem.
The particular file causing issues is stereo, so only goes to analog (which is via alsa). The problem still occurs, and the video is sped up to match the sped up audio.
after removing pulse audio, change Audio Output Device to "plug:iec958" and leave Passthough Output Device to "iec958". This will fix the issue.
Pages: 1 2