Re: [linux-audio-dev] MP3 Decoder wishlist

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] MP3 Decoder wishlist
From: Diemo Schwarz (Diemo.Schwarz_AT_ircam.fr)
Date: Wed Feb 27 2002 - 20:07:40 EET


Hi all, this is a very interesting thread because it pops up at a time
where we were asking ourselves the same question.

As there are several people interested in sample-precise access to
mp3-files, why not combine the efforts and create a generic efficient
method (see below for some propositions)?

Guenther Sohler wrote:
> I do seeking following way:
> I play trough the file, just decoding the frames, but not synthesizing them.
> This is done till the desired time is reached.
> This is quite slow. can't it be done faster by

> *just reading every frame's header ??

Sure.

> * originally seeking to a position in the mp3 file

Not sure. Think of a VBR file. You can't predetermine the position of
a frame in the file.

> Does every mp3 frame has the same size by default ?

I don't know the MPEG audio spec well enough to answer this.

> Is it a valid approach to seek *SOMEWHERE* to the mp3 file and
> make the decoder find the sync itself again ?

Yes, you can do that. (Look for three FF bytes which mark the
beginning of a frame.) However, with this approach you're not sure
where you're seeking, see above.

I wonder if the special Xing frame allows sample-precise seek, as it
only records 100 base points.

One idea for efficient sample-precise access is to seek though the mp3
file once and build a lookup table of pairs of (frame start position in
file, sample number in signal). This could be stored in an extra
file for direct access later, or better be written at the end of the
mp3 file itself, in a special frame format (if Xing can do it, why not
we?).

Any ideas on this, and if this should best go into an existing library
like MAD, or be a separate project?

Cheers...
                                                                ...Diemo

--
                    Diemo Schwarz  -  schwarz_AT_ircam.fr
          IRCAM - Centre Pompidou  -  Équipe Analyse-Synthèse
  http://www.ircam.fr/ - http://www.ircam.fr/equipes/analyse-synthese/
         1, place Igor-Stravinsky  -  75004 Paris  -  France
              tel +33-1-4478 4824  -  fax +33-1-4478 1540


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Feb 27 2002 - 19:58:41 EET