Log in

View Full Version : tooLame


WarpEnterprises
28th February 2003, 14:08
There is a new version 0.2k but I encountered some questions:

Version from http://www.inf.ufpr.br/~rja00/files/toolame.zip which is said to be a compile from DSPGuru is 57k big and displays:

Parsing Wave File Header
>>> 44100 Hz sampling freq selected
>>> Input Wave File is Stereo
--------------------------------------------
Input File : 'c:\_video\t.wav' 44.1 kHz
Output File: 't.mp2'
128 kbps MPEG-1 Layer II j-stereo Psy model 1
[De-emph:Off Copyright:No Original:No CRC:Off]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
--------------------------------------------
Insufficient PCM input for one frame - fillout with zeros
Hit end of audio data
Avg slots/frame = 417.959; b/smp = 2.90; bitrate = 128.000 kbps

Done

..........................

Version from http://mikecheng.d2.net.au/layer2/toolame-02k.zip is 226k, needs cygwin1.dll and displays:

Parsing Wave File Header
>>> 44100 Hz sampling freq selected
>>> Input Wave File is Stereo
--------------------------------------------
Input File : 'c:\_video\t.wav' 44.1 kHz
Output File: 't.mp2'
128 kbps MPEG-1 Layer II j-stereo Psy model 1
[De-emph:Off Copyright:No Original:No CRC:Off]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
--------------------------------------------
Hit end of audio data
Avg slots/frame = 417.959; b/smp = 2.90; bitrate = 128.000 kbps

Done

DSPguru
1st March 2003, 10:08
where's the problem :) ?
my compiliation is done with ICL7 and compressed with UPX. that's why it's smaller and why there's no need for cygwin's dlls.

as for the message mentioning that tooLame filled last frame with zeros - it's a natural thing to do. i don't know why the other binary didn't mention it, but it doesn't really matter.. :)

Ookami
1st March 2003, 10:47
Hi, as we have a tooLAME thread :) .

When I switched to the new "k" version I got "incompatible audio" or something like that in TMPGEnc.

IIRC, I've tried DSPGuru's and the original version...

So, I switched back to my old version (h?).

Does anyone knows where's the problem? Has the new version changed something so TMGPEnc doesn't call it properly?

Altough, I'm satisfied with the h version ;) .

Cheers,

Mijo.

DSPguru
1st March 2003, 11:17
@Ookami
your old version is probably i..

are you saying that tooLame produced an invalid bistream ?
for more functionality, instead of using tooLame.exe, use BeSweet.exe (with tooLame.dll).

Ookami
1st March 2003, 12:57
tooLAME version 0.2k (aborted by TMPGEnc at 66%):

"Start: 1.3.2003 12:40:47
End: 1.3.2003 12:41:52
Dealing time: 00:01:05
-------------------------------------------------------------
V:\zivot0001-clip.mpg
Format: DVD PAL (MPEG-2 720x576 25fps VBR 7000kbps, Layer-2 48000Hz 256kbps)
Video: V:\zivot0001.avi
Audio: V:\zivot0001.avi

Result: Illegal MPEG audiostream
Dealing time: 00:01:05
-------------------------------------------------------------"

Version ? (tooLAME32.exe from 9.10.2000. *eek, I thought that I use a newer version?*)

"Start: 1.3.2003 12:44:18
End: 1.3.2003 12:45:41
Dealing time: 00:01:22
-------------------------------------------------------------
V:\zivot0001-clip.mpg
Format: DVD PAL (MPEG-2 720x576 25fps VBR 7000kbps, Layer-2 48000Hz 256kbps)
Video: V:\zivot0001.avi
Audio: V:\zivot0001.avi

Result: Succeeded
Dealing time: 00:01:22
-------------------------------------------------------------"

-Audio settings in TMPGEnc: Stream type: MPEG 1 audio layer II :D
Sampling frequency: 48000
Channel mode: Stereo
Bitrate: 256
Error protection: enabled
all other stuff disabled-

Hmm, I'm just too lazy to use a external program, right now. Altough, it would be better (gain etc.), but right now I'm still in the testing phase, and haven't deleted any of my captures on my new PC. In the future I will, probably, use TMPGEnc Pro for video only and your BeSweet for audio. After that use a authoring program to make a nice DVD-5.

A thing that bothers me is that if I frameserve to TMPGEnc (and use trim to cut out the commercials etc.) will it be possible to use that info in BeSweet sometimes in the future? So, that means that I don't have to save the trimmed AVI/WAV to a seperate file, just use the uncut AVI and the trim infos from AviSynth... I hope you understand what I mean. Or something with a similar approach? Is there something I've missed (like always :) )?!

Cheers,

Mijo.

DSPguru
1st March 2003, 16:36
hmm.. i don't follow.. i'm afraid t's been ages since i last used TMPG...

does TMPG have a built-in support for tooLame ? or you had just set it as an external encoder ? please try using BeSweet, maybe i can find a hint in the logfile...

as for partial encoding,
this is already possible for ac3,mpx&wav inputs. partial encoding of avi, vob & ogg aren't offered yet.

DeXT
2nd March 2003, 02:25
Well on my tests with the latest BeSweet release, I have to say that I got significantly worse quality when using toolame.dll compared to mp2enc.dll. Not only that, but I also found that in most cases the frame rate conversion is not working properly on recent besweet versions, it gives "jittering" on the resulting audio no matter the output format.

Perhaps the worse quality in toolame may be due to the usage of integer processing instead of floating point processing... just a guess.

My tests (using besweet 1.5b16, today's release):

The source file is either a cbr-mp3 or pcm audio track at 48 KHz.

test1: source mp3, FRC, output mp2enc -> jittering
test2: source mp3, FRC, output toolame -> jittering + shitty (saturated?) audio
test3: source pcm, FRC, output mp2enc -> jittering
test4: source pcm, FRC, output toolame -> jittering (no saturated audio)
test5: source mp3/pcm, FRC+SSRC, output mp2enc -> PERFECT!
test6: source mp3/pcm, FRC+SSRC, output toolame -> just crashes

FRC = -ota( -r 23976 25000 )
SSRC = -shibatch ( --rate 44100 )

I can provide sample files for every test. I see two conclusions from my tests:

* FRC when used alone always gives jittering sound on recent besweet releases, at least since 1.5b8. It worked nice on 1.5b2 (tested). Strangely enough, when combined with SSRC there's no jittering at all (this only works for 48 KHz audio source).

* Toolame gives shitty quality when using MP3 input (saturated audio with clicks and pops) while quality is equal to that of mp2enc.dll when source is PCM. Finally if you try to combine FRC+SSRC using toolame besweet simply crashes.

Hope this helps in solving some issues. I'm very interested on the FRC issue since I use this on a daily basis and now I'm forced to use an old besweet release to get a decent quality.

On the other hand, in case toolame requires integer processing I think mp2enc should be the default one instead, because of the lesser quality, IMHO.

DSPguru
2nd March 2003, 07:01
very interesting..
please include all logfiles.

Ookami
2nd March 2003, 10:48
Originally posted by DSPguru
hmm.. i don't follow.. i'm afraid t's been ages since i last used TMPG...

does TMPG have a built-in support for tooLame ? or you had just set it as an external encoder ? please try using BeSweet, maybe i can find a hint in the logfile...

as for partial encoding,
this is already possible for ac3,mpx&wav inputs. partial encoding of avi, vob & ogg aren't offered yet.

Yes, external encoder. This is the main reason why I think that the latest version has changed something in the switches/calls.

If I find time I will try to use BeSweet and get back to you if I find something interesting.

Thanks for your answer.

Cheers,

Mijo.

DeXT
2nd March 2003, 11:14
Okay. Here you have them:

test1: (jittering)

besweet -core( -input \wasabi.mp3 -output \wasabi_mp3_frc_mp2enc.mp2 ) -ota( -r 23976 25000 ) -mp2enc( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using MP2enc.dll v1.129 (7/12/2002), Engine 1.129 <http://www.cdex.n3.net>.

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \wasabi_mp3_frc_mp2enc.mp2
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 23976
[00:00:00:000] | Dest. Frame-Rate: 25000
[00:00:00:000] +------- MP2ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:914] Conversion Completed !
[00:00:15:914] Actual Avg. Bitrate : 122kbps
[00:00:01:000] <-- Transcoding Duration

test2: (jittering+saturated)

besweet -core( -input \wasabi.mp3 -output \wasabi_mp3_frc_toolame.mp2 ) -ota( -r 23976 25000 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \wasabi_mp3_frc_toolame.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 23976
[00:00:00:000] | Dest. Frame-Rate: 25000
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:914] Conversion Completed !
[00:00:15:914] Actual Avg. Bitrate : 122kbps
[00:00:01:000] <-- Transcoding Duration

test3: (jittering)

besweet -core( -input \wasabi.wav -output \wasabi_pcm_frc_mp2enc.mp2 ) -ota( -r 23976 25000 ) -mp2enc( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using MP2enc.dll v1.129 (7/12/2002), Engine 1.129 <http://www.cdex.n3.net>.

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.wav
[00:00:00:000] | Output: \wasabi_pcm_frc_mp2enc.mp2
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 23976
[00:00:00:000] | Dest. Frame-Rate: 25000
[00:00:00:000] +------- MP2ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:900] Conversion Completed !
[00:00:15:900] Actual Avg. Bitrate : 122kbps
[00:00:01:000] <-- Transcoding Duration

test4: (jittering, no saturated audio)

D:\dvd\besweet15b16>besweet -core( -input \wasabi.wav -output \wasabi_pcm_frc_toolame.mp2 ) -ota( -r 23976 25000 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.wav
[00:00:00:000] | Output: \wasabi_pcm_frc_toolame.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 23976
[00:00:00:000] | Dest. Frame-Rate: 25000
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:900] Conversion Completed !
[00:00:15:900] Actual Avg. Bitrate : 122kbps
[00:00:01:000] <-- Transcoding Duration

test5: (quality ok)

besweet -core( -input \wasabi.mp3 -output \wasabi_mp3_frc_ssrc_mp2enc.mp2 ) -ota( -r 23976 25000 ) -shibatch( --rate 44100 ) -mp2enc( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using MP2enc.dll v1.129 (7/12/2002), Engine 1.129 <http://www.cdex.n3.net>.

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \wasabi_mp3_frc_ssrc_mp2enc.mp2
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 960
[00:00:00:000] | Dest. Frame-Rate: 1001
[00:00:00:000] +------- MP2ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:928] Conversion Completed !
[00:00:15:928] Actual Avg. Bitrate : 122kbps
[00:00:01:000] <-- Transcoding Duration

test6: (saturated)

D:\dvd\besweet15b16>besweet -core( -input \wasabi.mp3 -output \wasabi_mp3_frc_ssrc_toolame.mp2 ) -ota( -r 23976 25000 ) -shibatch( --rate 44100 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \wasabi_mp3_frc_ssrc_toolame.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +-------- FRC --------
[00:00:00:000] | Source Frame-Rate: 960
[00:00:00:000] | Dest. Frame-Rate: 1001
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:928] Conversion Completed !
[00:00:15:928] Actual Avg. Bitrate : 122kbps
[00:00:01:000] <-- Transcoding Duration

Strangely enough (again) on these tests toolame didn't crash when I used FRC+SSRC together. Let's see if I can reproduce yesterday's results. In any case, SSRC didn't manage to correct the saturated audio with toolame, but the jittering was gone. Remember that with 1.5b2 there's no jittering at all, with no need to use SSRC.

The offending file: wasabi.mp3 (http://webs.ono.com/dextstuff/wasabi.mp3) (254 KB). It's a 48 KHz CBR-MP3 at 128 Kbps which has been normalized to a high volume level, so it's OK to test wether besweet saturates audio or not. To obtain the PCM version just convert it to WAV with your favorite tool.

DeXT
2nd March 2003, 11:31
Okay, let's isolate things, this time I did not use FRC to see how toolame performs form mp3 input when compared to mp2enc.

test7: source mp3, output mp2enc -> OK
test8: source mp3, output toolame -> shitty (saturated) audio

test7: (quality ok)

besweet -core( -input \wasabi.mp3 -output \wasabi_mp3_mp2enc.mp2 ) -mp2enc( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using MP2enc.dll v1.129 (7/12/2002), Engine 1.129 <http://www.cdex.n3.net>.

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \wasabi_mp3_mp2enc.mp2
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------- MP2ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:960] Conversion Completed !
[00:00:15:960] Actual Avg. Bitrate : 127kbps
[00:00:01:000] <-- Transcoding Duration

test8: (saturated)

besweet -core( -input \wasabi.mp3 -output \wasabi_mp3_toolame.mp2 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \wasabi_mp3_toolame.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:960] Conversion Completed !
[00:00:15:960] Actual Avg. Bitrate : 127kbps
[00:00:00:000] <-- Transcoding Duration

When using PCM input the result was OK for both codecs. So the problem with toolame is with MP3 input only.

[EDIT]

More tests (test5/6 with PCM input):

test5b: source PCM, FRC+SSRC, mp2enc -> OK
test6b: source PCM, FRC+SSRC, toolame -> saturated!

So it's not just with MP3 input :sly:

[EDIT]

Take a look at these images, taken with CoolEdit's spectral view. They show the audio files form the MP3->MP2 conversion tests stated above (test7/8):

http://webs.ono.com/dextstuff/w_mp3_orig.jpg
http://webs.ono.com/dextstuff/w_mp3_toolame.jpg
http://webs.ono.com/dextstuff/w_mp3_mp2enc.jpg

The first one contains the original audio file (the one posted in the previous post). The second one (converted with toolame from mp3) shows severe artifacts in the form of vertical red lines. These appear only inside an area of very low frequencies in the original. The third one shows the mp2enc graph (there are some magenta horizontal lines but it sounds good). You can clearly see that toolame also cuts frequencies above 14000 Hz while mp2enc retains most of the original frequencies (abt 16000 Hz).

So this problem with toolame only appears with low frequencies, and not with "saturated" audio as I stated earlier.

FuPP
3rd March 2003, 23:03
1/ I've seen somewhere on the net that one should use bitrates above 192 in order to preserve surround information when encoding with mpeg1 layer II.

- Does it mean that using vbr mode, there are more risks to lose surround information (according to the doc, bitrates from 112 to 384 are used by vbr mode when encoding 48Khz source)?


2/ I have compared results of an encoding (short one, about 5min.) using vbr mode with PAM1 and PAM2 (quality factor = 10).

Psycho 1 : average bitrate = 230
Psycho 2 : average bitrate = 182

Why such a difference?
How to interprete it for constant bitrates ?
Is one of these PAMs better for preserving surround information ?

Regards,
FuPP

symonjfox
4th March 2003, 13:35
You must use ENCSPOT to check the right bitrate of VBR Mp2 or 3.

Winamp and other programs wrong.

I think that sourround is kept also when bitrate drops to 112 kbs (in a very quiet audio) in VBR mode.

FuPP
4th March 2003, 13:55
Originally posted by symonjfox
You must use ENCSPOT to check the right bitrate of VBR Mp2 or 3.


That is what I did ;)

It gave me bitrate distribution but did not answer my questions...

FuPP

DeXT
4th March 2003, 22:13
As the FRC issue is fixed now, let's update the status of the toolame issue. Forget the tests shown above.

To summarize:

source MP3, output toolame -> bad
source MP2, output toolame -> bad
source PCM, output toolame -> good!
source AC3, output toolame -> good!

But...

source PCM, then SSRC, output toolame -> bad!
source AC3, then SSRC, output toolame -> good

So SSRC is ruining the toolame output with PCM input. Strangely enough the AC3 input test was not affected (I'll have to test if low frequencies were cutted from it). The other switches (boost, FRC, azid gain) didn't make any difference.

The jittering with FRC is now gone thanks to the latest BeSweet fix as of today (4/3/03).

All the tests were made with the same sample audio file previously converted using besweet 1.4 to the various formats. They all sounded nice.

Logs will be posted later, althought they are all anodine...

[EDIT]

MP3->MP2 (bad)

besweet -core( -input \wasabi.mp3 -output \pr.mp2 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp3
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:960] Conversion Completed !
[00:00:15:960] Actual Avg. Bitrate : 127kbps
[00:00:01:000] <-- Transcoding Duration

MP2->MP2 (bad)

besweet -core( -input \wasabi.mp2 -output \pr.mp2 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.mp2
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:912] Conversion Completed !
[00:00:15:912] Actual Avg. Bitrate : 127kbps
[00:00:01:000] <-- Transcoding Duration

PCM->MP2 (good)

besweet -core( -input \wasabi.wav -output \pr.mp2 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.wav
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:900] Conversion Completed !
[00:00:15:900] Actual Avg. Bitrate : 127kbps
[00:00:01:000] <-- Transcoding Duration

AC3(2ch)->MP2 (good)

besweet -core( -input \wasabi.ac3 -output \pr.mp2 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using azid.dll v1.8 (b825) by Midas (midas@egon.gyaloglo.hu).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.ac3
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 2/0, Bitrate: 384kbps
[00:00:00:000] | Output Stereo mode: Dolby surround compatible
[00:00:00:000] | Total Gain: 0.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:872] Conversion Completed !
[00:00:15:872] Actual Avg. Bitrate : 127kbps
[00:00:00:000] <-- Transcoding Duration

PCM->SSRC->MP2 (bad)

besweet -core( -input \wasabi.wav -output \pr.mp2 ) -shibatch( --rate 44100 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.wav
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:900] Conversion Completed !
[00:00:15:900] Actual Avg. Bitrate : 127kbps
[00:00:02:000] <-- Transcoding Duration

AC3->SSRC->MP2 (good, again)

besweet -core( -input \wasabi.ac3 -output \pr.mp2 ) -shibatch( --rate 44100 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using azid.dll v1.8 (b825) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.ac3
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 2/0, Bitrate: 384kbps
[00:00:00:000] | Output Stereo mode: Dolby surround compatible
[00:00:00:000] | Total Gain: 0.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:872] Conversion Completed !
[00:00:15:872] Actual Avg. Bitrate : 127kbps
[00:00:02:000] <-- Transcoding Duration

AC3->SSRC->BOOST->MP2 (still good)

besweet -core( -input \wasabi.ac3 -output \pr.mp2 ) -shibatch( --rate 44100 ) -boost( /b=3 /l=0.95 ) -toolame( -m s -b 128 -e )
BeSweet v1.5b16 by DSPguru.
--------------------------
Using azid.dll v1.8 (b825) by Midas (midas@egon.gyaloglo.hu).
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2k (Feb 22 2003) by Mike Cheng <http://tooLame.sf.net>
Manual Dynamic-Compression algorithm by LigH (author of WaveBooster).

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : \wasabi.ac3
[00:00:00:000] | Output: \pr.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] +-------- AZID -------
[00:00:00:000] | Input Channels Mode: 2/0, Bitrate: 384kbps
[00:00:00:000] | Output Stereo mode: Dolby surround compatible
[00:00:00:000] | Total Gain: 0.000dB, Compression: None
[00:00:00:000] | LFE levels: To LR -INF, To LFE 0.0dB
[00:00:00:000] | Center mix level: BSI
[00:00:00:000] | Surround mix level: BSI
[00:00:00:000] | Dialog normalization: No
[00:00:00:000] | Rear channels filtering: No
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Dest. Sample-Rate: 44.1KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +-------- BOOST ------
[00:00:00:000] | Algorithm by : LigH
[00:00:00:000] | Boost Factor : 3.0
[00:00:00:000] | Limit Factor : 0.95
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 128
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:00:15:872] Conversion Completed !
[00:00:15:872] Actual Avg. Bitrate : 127kbps
[00:00:02:000] <-- Transcoding Duration

It's verified, the AC3 decoding does not cut low frequencies, I even applied boost to it since the volume level was a bit lower than the other tests, once I reached the same amplitude, but it still sounded nice.

As I posted on the previous post, the artifacts appear only on areas of very low frequencies. Mp2enc output was always good. The sample file used is the same one posted above.

Hope this helps.

kempfand
8th December 2003, 00:19
I recently run into similar problems than described here, with transcoding wav or mp3 to mp2.

Went back to 'old' versions of BeSweet 1.4 (exe from 9/27/2002) and GUI (exe from 10/25/2002), which work OK, but they use mp2enc.dll.

Current versions specify tooLame.dll in the "MP2 for DVD"-profile, and the transcoded sound sounds 'scratched'. When using the mp2enc-engine, things are 'back to normal' (i.e. OK). [Logfiles attached]

I just was wondering if both engines are just different codings to achieve the same, or if there are procedural differences on how they translate into mp2.

Regards,
Andreas


tooLame.dll: producing 'scratchy' sound:
BeSweet v1.5b23 by DSPguru.
--------------------------
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using tooLame.dll v0.2l (Apr 24 2003) by Mike Cheng <http://tooLame.sf.net>

Logging start : 12/08/03 , 00:12:44.

C:\BeSweet\BeSweet.exe -core( -input h:\Randy Crawford - Unwounded.wav -output h:\tooLame-Engine.mp2 -logfile C:\BeSweet\BeSweet.log ) -ota( -hybridgain ) -ssrc( --rate 48000 ) -toolame( -m s -b 192 -e ) -profile( ~~~~~ Default Profile ~~~~~ )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : h:\Randy Crawford - Unwounded.wav
[00:00:00:000] | Output: h:\tooLame-Engine.mp2
[00:00:00:000] | Floating-Point Process: No
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Dest. Sample-Rate: 48.0KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +------ tooLame ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 192
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:03:09:310] Conversion Completed !
[00:03:09:310] Actual Avg. Bitrate : 191kbps
[00:00:15:000] <-- Transcoding Duration

Logging ends : 12/08/03 , 00:13:00.
MP2enc: producing 'good' sound: BeSweet v1.5b23 by DSPguru.
--------------------------
Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using MP2enc.dll v1.129 (23/5/2002), Engine 1.129 <http://www.cdex.n3.net>.

Logging start : 12/08/03 , 00:14:49.

C:\BeSweet\BeSweet.exe -core( -input h:\Randy Crawford - Unwounded.wav -output h:\mp2Enc-Engine.mp2 -logfile C:\BeSweet\BeSweet.log ) -ota( -hybridgain ) -ssrc( --rate 48000 ) -mp2enc( -m s -b 192 -e )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : h:\Randy Crawford - Unwounded.wav
[00:00:00:000] | Output: h:\mp2Enc-Engine.mp2
[00:00:00:000] | Floating-Point Process: Yes
[00:00:00:000] | PostGain normalize to : 0.97
[00:00:00:000] +------ Shibatch -----
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Dest. Sample-Rate: 48.0KHz
[00:00:00:000] | Attenuation : 0.0db
[00:00:00:000] +------- MP2ENC ------
[00:00:00:000] | Bitrate method : CBR
[00:00:00:000] | MP2 bitrate : 192
[00:00:00:000] | Channels Mode : Stereo
[00:00:00:000] | Error Protection: Yes
[00:00:00:000] +---------------------
[00:03:09:310] Conversion Completed !
[00:03:09:310] Actual Avg. Bitrate : 192kbps
[00:00:15:000] <-- Transcoding Duration

Logging ends : 12/08/03 , 00:15:04.

DSPguru
8th December 2003, 10:04
toolame.dll & mp2enc.dll are different tools.
i recall a bugreport stating that encoding with toolame.dll ended with static noise at one of the channels. if i remember correctly, the solution was using another psymodel.

kempfand
9th December 2003, 02:22
@DSPguru: Thanks for the hint, I now found the info here here_1 (http://forum.doom9.org/showthread.php?threadid=58326&highlight=toolame+noise) and here_2 (http://forum.doom9.org/showthread.php?threadid=19597&perpage=20&pagenumber=3) (last post).

"My" problem (meaning it does not happen necessarily on other's machines) becomes less pronounced when using PSY=2, but PSY=2 produces some high-pitched noise here and there (not related to MS MPEG1 deocder, as I don't use that one).

Some more testing resulted as follows: Using the tooLame EXE and PSY=1 works fine (I tested both v.02k from Doom9's download, as well as v.02l from tooLame v0.2l EXE (http://www.dawnload.net/audio_software/audio_encoders/toolame.cfm).

Command-line is "C:\BeSweet\tooLame.exe" -m s -p 1 -b 192 -e "h:\Randy Crawford - Unwounded.wav" "h:\01_ToL_PSY_1.mp2" and DOS-output is C:\>"C:\BeSweet\tooLame.exe" -m s -p 1 -b 192 -e "h:\Randy Crawford - Unwounded.
wav" "h:\01_ToL_PSY_1.mp2"
Parsing Wave File Header
>>> 44100 Hz sampling freq selected
>>> Input Wave File is Stereo
--------------------------------------------
Input File : 'h:\Randy Crawford - Unwounded.wav' 44.1 kHz
Output File: 'h:\01_ToL_PSY_1.mp2'
192 kbps MPEG-1 Layer II stereo Psycho model=1 (Mode_Extension=0)
[De-emph:Off Copyright:No Original:No CRC:On]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
ATH adjustment 0.000000
--------------------------------------------
encode_init: using tablenum 1 with sblimit 30
Hit end of audio data
Avg slots/frame = 626.939; b/smp = 4.35; bitrate = 192.000 kbps

Done

Furthermore, I saw that PSY=3 is now available, but this crashed my system (both for the v.02l EXE and DLL): "C:\BeSweet\tooLame.exe" -m s -p 3 -b 192 -e "h:\Randy Crawford - Unwounded.wav" "h:\01_ToL_PSY_1.mp2" resulting in C:\>"C:\BeSweet\tooLame.exe" -m s -p 3 -b 192 -e "h:\Randy Crawford - Unwounded.
wav" "h:\01_ToL_PSY_3.mp2"
Parsing Wave File Header
>>> 44100 Hz sampling freq selected
>>> Input Wave File is Stereo
--------------------------------------------
Input File : 'h:\Randy Crawford - Unwounded.wav' 44.1 kHz
Output File: 'h:\01_ToL_PSY_3.mp2'
192 kbps MPEG-1 Layer II stereo Psycho model=3 (Mode_Extension=0)
[De-emph:Off Copyright:No Original:No CRC:On]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
ATH adjustment 0.000000
--------------------------------------------
encode_init: using tablenum 1 with sblimit 30
3 [main] tooLame 3804 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
1990 [main] tooLame 3804 open_stackdumpfile: Dumping stack trace to tooLame.e
xe.stackdump

From the info on PSY=3: Psychoacoustic Model 3
A re-implementation of psychoacoustic model 1. ISO11172 was used as the guide for re-writing this PAM from the ground up.
Pros: No more obscure tables of values from the ISO code. Hopefully a good base to work upon for tweaking PAMs
Cons: At the moment, doesn't really sound any better than PAM1

Finally, I saw that the latest version of tooLame is v.02m-beta7, which can be downloaded from the author at 02m beta 7 (http://mikecheng.d2.net.au/toolame-02m-beta7.tar.bz2)

I wanted to test this, to see if it works better, but unfortunately, I was unable to find a compiled version of the DLL. I don't know if this is quickly done, but I would be happy to test the new (v.02m-beta7) dll.

Kind regards,

Andreas

DSPguru
9th December 2003, 05:13
the dll version of toolame is my work.
i had sent my modifications to mike, but i'm afraid he hadn't merge the two source-codes.
perhaps you can mail mike and urge him to release toolame.dll.. ?

kempfand
14th December 2003, 04:53
Send an email to Mike on 12/08, but so far no answer.

The "bug" is somewhere around the current dll, as the standalone encodes work fine (i.e. via tooLame.EXE).

I hope we can get this worked out over time, as I personally prefer the PSY-1-mode of tooLame over mp2Enc. It sounds more "harmonic", more "balanced", and less "nervous" (but this is my personal taste).

Current workaround is a 2-step-approach:
(1) wav_1 -> wav_2, with -ota( -hybridgain )
(2) tooLame.exe on wav_2

Kind regards,

Andreas

J-Wo
7th March 2004, 22:46
I was just wondering, why isn't toolame.dll included in either Besweet v1.4 stable release or the 1.5 beta 18 release? There is also no link to it in the plugin page of http://dspguru.doom9.net. I have always had a great deal of trouble finding this file and am perplexed why it isn't included in the zip if there is support for it within the program.

Scorpvenom
13th March 2004, 08:15
BeSweet v1.5b25 by DSPguru.
--------------------------
Using VOBInput.dll v1.3 by DVD2SVCD (http://www.dvd2svcd.org)
Using hip.dll v1.19 by Myers Carpenter <myers@users.sf.net>
Using Ogg Vorbis v1.0 dlls (http://www.vorbis.com).
Error 80: Error getting tooLame.dll interfaces
Quiting...
[00:00:00:000] Conversion Completed !

Logging ends : 03/13/04 , 02:13:43.

How do I fix this error? I'm trying to convert mpeg2 sound to a lower mpeg2 bitrate.

Scorpvenom
13th March 2004, 08:30
I was able to make the file into a .wav using winamp. When loading the .wav into besweet, I get this error when trying to convert it to mp2

BeSweet v1.5b25 by DSPguru.
--------------------------
Error 80: Error getting tooLame.dll interfaces
Quiting...
[00:00:00:000] Conversion Completed !

Logging ends : 03/13/04 , 02:30:34.

FuPP
14th March 2004, 00:56
Originally posted by Scorpvenom
I was able to make the file into a .wav using winamp. When loading the .wav into besweet, I get this error when trying to convert it to mp2

BeSweet v1.5b25 by DSPguru.
--------------------------
Error 80: Error getting tooLame.dll interfaces
Quiting...
[00:00:00:000] Conversion Completed !

Logging ends : 03/13/04 , 02:30:34.

probably a stupid question, but did you put toolame.dll in your besweet directory ?