The duration of the MP3 converted from PCM is not normal

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The duration of the MP3 converted from PCM is not normal

Adam Zhou (linzhou)
Hello Lame Dev,

I used Lame 3.99.5 to convert one PCM file to MP3 file. The PCM's  duration is 35:05.100. After converting, I used Windows Media Player to play the MP3. The player showed the duration is 35:05. But this MP3 could play to 35:28.

What do you have any suggestion to check this issue?

Thanks,
-Adam
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Lame-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/lame-dev
Reply | Threaded
Open this post in threaded view
|

Re: The duration of the MP3 converted from PCM is not normal

Thomas Orgis
Am Wed, 31 Jul 2013 12:08:09 +0000
schrieb "Adam Zhou (linzhou)" <[hidden email]>:

> Hello Lame Dev,
>
> I used Lame 3.99.5 to convert one PCM file to MP3 file. The PCM's  duration is 35:05.100. After converting, I used Windows Media Player to play the MP3. The player showed the duration is 35:05. But this MP3 could play to 35:28.

You mean 35:28 as in 35 minutes and 28 seconds, 23 seconds more than
the input PCM? That seems rather large and I'd strongly suppose that
either your input or output duration are not correct. Can you provide
example files for this (preferrablly smaller in duration)? That the
displayed duration of the player while playing is not reliable can come
via VBR encoding and the player not interpreting the LAME tag, dunno if
the Media Player falls victim to that. I'd check playback duration with
another decoder, and then re-check what I think is the duration of the
PCM.


Alrighty then,

Thomas

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Lame-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/lame-dev
Reply | Threaded
Open this post in threaded view
|

Re: The duration of the MP3 converted from PCM is not normal

Josep Maria Antolin
If this is a VBR file (like suggested by Thomas), and you have used the
seek function (i.e. moved the slider to seek in time), then the error is
around the possible rounding effect.

A VBR file has a table of 100 positions that represent one hundredth of the
duration of the file.

Since the file duration is 35:05 = 2105 seconds, each percent is 21.05
seconds.  (35:05+21 = 35:26).

Players should interpolate this table when seeking, so if (song)position
41% is (file)position 1500 and (song)position 42% is (file)position 1600,
when asked for position 41.5% it should seek to 1550, not to 1500.

I don't know what Windows Media Player does in this regard...
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Lame-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/lame-dev
Reply | Threaded
Open this post in threaded view
|

Re: The duration of the MP3 converted from PCM is not normal

Thomas Orgis
Am Wed, 31 Jul 2013 18:34:48 +0200
schrieb Josep Maria Antolin <[hidden email]>:

> If this is a VBR file (like suggested by Thomas), and you have used the
> seek function (i.e. moved the slider to seek in time), then the error is
> around the possible rounding effect.  

> Players should interpolate this table when seeking  

Damn, I was not aware that a player should interpolate with the
associated error. I made mpg123 actually seek to one of the given 100
positions and advance from there. So, that particular player should be
sample-accurate even when hopping around in VBR. I went through pains
and caused some code convolution to assure that;-)

But yes, "normal" players can introduce that through seeking. This is
what mpg123 does in fuzzy seeking mode (with even larger error without
the seek table).


Alrighty then,

Thomas

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Lame-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/lame-dev