Bug 76161 - 48000 Hz mp3 plays extremely choppy
Summary: 48000 Hz mp3 plays extremely choppy
Status: RESOLVED INTENTIONAL
Alias: None
Product: mpeglib
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Multimedia Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-26 05:38 UTC by Tony Vroon
Modified: 2008-09-07 18:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Vroon 2004-02-26 05:38:23 UTC
Version:           2.0 (using KDE 3.2.0, Gentoo)
Compiler:          gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)
OS:          Linux (i686) release 2.6.3-mm3

I have a valid MP3 file that plays fine in mpg321, but sounds quite bad in JuK. The sound seems distorted, a similar effect can be created by playing an MP3 file, and holding down M in alsamixer to rapidly mute/unmute the master channel.
The tempo doesn't seem very far off, though. It's not playing 50% too slow/fast.

This is mpg321's output in verbose mode:

MPEG 1.0, Layer: III, Freq: 48000, mode: Stereo, modext: 0, BPF : 3840
Channels: 2, copyright: Yes, original: Yes, CRC: No, emphasis: 0.
Bitrate: 192 Kbits/s, Extension value: 0
Audio: 1:1 conversion, rate: 48000, encoding: signed 16 bit, channels: 2

The 48kHz rate is most probably the problem, I don't have much MP3's like this one. (But if mpg321 can play it, it seems valid)
Comment 1 Scott Wheeler 2004-02-26 10:38:16 UTC
JuK doesn't do any decoding -- that's all handled by aRts (mpeglib specifically there) or GStreamer (depending on which backend you're using).

I presume you're running into some problems with the resampling stuff there.
Comment 2 Tony Vroon 2004-03-08 13:35:11 UTC
I am not using the GStreamer backend, so mpeglib it is then.
I'm wondering why it would need to resample, my CMI8738, whilst not capable of handling all sample rates, can handle both 44100 and 48000 (I'm using ALSA drivers for it, and do not have aRTs locked at a specific sample rate).
Comment 3 Allan Sandfeld 2004-03-09 11:15:25 UTC
aRts is a soundserver, in order to mix all kinds of inputs it needs a basic output format. The default is 44100, but you can force it to use 48000 (in which case 44100 samples will be resampled). It might be better to use 48000, as the resampling will then be an upsampling and not a downsampling, but I havent tested the resampling quality in aRts.

Btw. are you certain you are have mpeglib_artsplugin installed? If not you might be using the internal GSL-plugin in arts which is known to suck.
Comment 4 Roger Larsson 2004-03-12 00:43:58 UTC
For some situations aRTs should not resample.
* When playing a single audio.
* When the audioboard can support several simultaneous channels (SB Live)

Since conversions between 44100 and 48000 are among the most expensive maybe
aRTs should try to open and use one of each - possible?

48000 for 8000 (6x) - 16000 (3x) - 32000 (3x/2) and downsampled 96000 (/2)
44100 for mpegs, waves from CDs
Comment 5 matze 2004-03-13 17:58:02 UTC
Do these multichannel cards really have a set of codecs that can be routed to each audio output deliberately? I was of the impression that they might have 5.1 surround sound but only one dedicated codec per (stereo-)channel.
Generally, one codec can not output multiple samplerates at the same time...
Comment 6 Roger Larsson 2004-03-13 19:50:18 UTC
These boards have a built in audio processor and can mix several
audiosources themselves.

Try

aplay -Dhw track1.wav &
aplay -Dhw track2.wav &

But now when I tried it - it sounds terrible...
My guess is that calculations overflows and possibly wraps...
Comment 7 Roger Larsson 2004-03-13 22:11:21 UTC
Update: To avoid the overflows lowering the "Wave" bar in kmix. Much better!
Comment 8 Nick Shaforostoff 2008-09-07 18:33:54 UTC
wontfix because arts is unmaintained AND isn't used anymore, even in kde3 environments