Martin,
1) You can set the quality using the format.LHV1.nQuality parameter
2) To get ABR with You have to set the following parameters (using the
latest CVS code, it already
contains the modifcation you have suggested)
lameConfig.format.LHV1.nVbrMethod = VBR_METHOD_ABR
lameConfig.format.LHV1.bEnableVBR = TRUE;
lameConfig.format.LHV1.bWriteVBRHeader = FALSE;
lameConfig.format.LHV1.dwVbrAbr_bps = (desired value)
I'll change the documentation later tonight and add the nVbrMethod paramter
description
Albert
- Original Message -
From: Martin Ruckert [EMAIL PROTECTED]
To: mp3 encoder list [EMAIL PROTECTED]
Sent: 30 July 2002 ?. 12:25 PM
Subject: [MP3 ENCODER] Lame DLL
There are two problems I have with the lame encoder DLL:
1. there is no way to set the Noise shaping psycho acoustic algorithms:
corresponding to the comandline arguments of Lame
-q argarg = 0...9. Default -q 5
-q 0: Highest quality, very slow
-q 9: Poor quality, but fast
-h Same as -q 2. Recommended.
-f Same as -q 7. Fast, ok quality
Hence you are stuck with -q 5 (which often is not good enough or not
fast
enough:
2. This is a bug (and I hope someone can fix it for me or explain how I
can
put a fix into the official lame cvs repository myself.)
If you produce mp3 streaming audio, it is common
to use average bitrate (--abr ) and not have a VBR tag
(since it has to be added to the beginning of the stream
after all of the stream is written. Impossible)
The only place to set the WriteVbrTag is here:
if ( lameConfig.format.LHV1.bEnableVBR )
{
lame_set_VBR( gfp, vbr_default );
lame_set_VBR_q( gfp, lameConfig.format.LHV1.nVBRQuality );
if (lameConfig.format.LHV1.bWriteVBRHeader==TRUE)
{
lame_set_bWriteVbrTag( gfp, 1 );
}
else
{
lame_set_bWriteVbrTag( gfp, 0 );
}
}
else
{
lame_set_VBR( gfp, vbr_off );
}
it requires EnableVBR==TRUE and WriteVBRHeader==FALSE
To get average bitrate you have to set the average bitrate to a positive
value:
// Use ABR?
if (lameConfig.format.LHV1.dwVbrAbr_bps0)
{
// set VBR to ABR
lame_set_VBR( gfp, vbr_abr );
unfortunately next comes:
// Use VBR?
if ( lameConfig.format.LHV1.bEnableVBR )
{
switch ( lameConfig.format.LHV1.nVbrMethod)
{
case VBR_METHOD_NONE:
lame_set_VBR( gfp, vbr_off );
break;
case VBR_METHOD_DEFAULT:
lame_set_VBR( gfp, vbr_default );
break;
. . .
case VBR_METHOD_ABR:
lame_set_VBR( gfp, vbr_abr );
break;
and sice we have enabled VBR and VbrMethod is an undocumented feature (not
described in LameDLLInterface.htm) we are stuck with the default
VbrMethod==0
that is VBR_METHOD_DEFAULT and we are back to variable bitrate and not
average bitrate.
Solutions:
1. Make VbrMethod a documented feature.
2. Remove the test for WriteVBRHeader and the call to
lame_set_bWriteVbrTag
from its nesting inside the EnableVBR test and make it an independent
test.
Best use both solutions 1 and 2.
Who can help ?
Martin Ruckert
___
mp3encoder mailing list
[EMAIL PROTECTED]
http://minnie.tuhs.org/mailman/listinfo/mp3encoder
___
mp3encoder mailing list
[EMAIL PROTECTED]
http://minnie.tuhs.org/mailman/listinfo/mp3encoder