[Vorbis] RE: Re: very low bandwidth encoding

Monty xiphmont at xiph.org
Wed Sep 22 10:01:42 PDT 2004




On Thu, Sep 23, 2004 at 06:34:40PM +0100, Andy Baxter wrote:
> On Thu, 23 Sep 2004 10:38:21 +0200, Giuliano Pochini wrote:
> 
> > 
> > On 22-Sep-2004 Andy Baxter wrote:
> > 
> >> is giving fairly decent sound at 12 kbps mono if I play it through ogg123,
> >> but sounds tinny and strange if I play through alsaplayer. xmms has the
> >> same problem. zinf plays these files OK - same as ogg123.
> > 
> > ALSA uses a rough and fast "pick the nearest sample" resampling
> > algorithm, which gives very bad results. Alsaplayer uses a fixed
> > sample rate (you can change it via command line). 
> 
> When it plays wavs, it seems to forget about the sample rate in the header
> altogether and just play at 44100 Hz whatever, so the 11025 Hz wavs I've
> written come out at 4 times the original speed. But it doesn't do this for
> ogg files - it plays at the right speed, but with a strange tinny sound
> which you don't get with ogg123. Like it's playing inside a biscuit tin,
> plus a weird sweeping effect in the high pitches. The same effect happens
> with the other linux players I mentioned - kaboodle and noatun, so I guess
> it's caused by the same problem.

This is often caused by a fast/low-quality on-the-fly resampler.
Chances are what's happening is that your sound card doesn't actually
support the sample rate of your files. Some software will just say
"Nope, no go", some software will do a naieve low-quality resampling.

> > Xmms tries to
> > match the file's sample rate but, if the card can't do it, ALSA
> > does the resampling. IIRC alsa-1.0.7 will use linear interpolation.

What he said.  Linear interpolation will cause exactly the high
frequency artifact you describe.

Monty


More information about the Vorbis mailing list