>>> MPEG-1 Layer I is 384 samples. MPEG-1 Layer II and III is 1152 samples.
>>> Values are halved for LSF.
>>
>> The number of samples is only halved for Layer III LSF (576). Layer I and
>> Layer II are always 384 and 1152 samples, respectively.
> 
> What is Layer III "LSF" ?

LSF refers to the MPEG 2 extension to Lower Sampling Frequencies (24000,
22050, and 16000 Hz.) The "ID" bit in the frame header is 0 for LSF.

In LSF, Layer III has only one granule rather than two, so there are half as
many output samples per frame.

> I had a problem with some files to compute the length in second of a
> frame. I was using various Layer III format and is some cases the formula
> "frame_time = samples / frame_per_second" wouldn't give me the right
> length. I assume it might be comming from this LSF.

How do you calculate frame_per_second?

A better formula would be

  frame_time = frame_samples / sampling_frequency

to get frame_time in seconds.

LSF can affect both frame_samples and sampling_frequency:

                                MPEG 1        MPEG 2 LSF

        Sampling Frequency      48000           24000
                                44100           22050
                                32000           16000
        Samples/Frame
        Layer I                   384             384
        Layer II                 1152            1152
        Layer III                1152             576

> By the way, the formula never work with 'free format' files (encoded with
> LAME 3.86beta), but I've found another one which works fine. (can't
> remember, but I can give it if you want).

The above formula will work regardless of bitrate, free format or otherwise.

-- 
Rob Leslie
[EMAIL PROTECTED]
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to