Help - Search - Members - Calendar
Full Version: need a custom Lame dll
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
jmartis
Hi all, I am using Oddcast source client (Winamp plugin) to stream mp3 audio to a Shoutcast server. I am streaming at 96kbps, and here comes the problem: Oddcast uses Lame dll for encoding the mp3 stream, and does not allow any custom command line for the encoder. There is one weird thing with the Oddcast: when streaming at 32khz, there are awful clipping/chirping noises in the stream, so I am forced to use 44khz. However, newest Lame versions do not like this samplerate at 96kbps and produce a very noticable crumpling/thumping artifact. I have found that Lame 3.93.1 with "--alt-preset cbr 96" switch resampled to 44khz does not produce that artifact, and overall sounds nice. But for this I would need a custom Lame 3.93.1 dll that "includes" the "--alt-preset cbr 96" switch.
I would gladly compile it myself, if I only knew how, sad.gif I have never compiled anything before. I would appreciate any advice on how to compile it, even better would be if anyone would be so kind and compile it for me.
Thanks in advance, J.M.
john33
I'll put one together if it's not too much of a problem. Give me a day, or two. wink.gif
jmartis
QUOTE(john33 @ Jan 24 2007, 18:44) *

I'll put one together if it's not too much of a problem. Give me a day, or two. wink.gif

Big Thanks john, you're my hero beer.gif
john33
Mines a Guinness, thanks. wink.gif

I have one kind of working right now that only encodes 'preset cbr 96'. Is that what you want? I'll need to test it a bit more but right now it ignores settings in CDex and simply proceeds to encode at 'preset cbr 96'. Let me know. smile.gif
jmartis
QUOTE(john33 @ Jan 24 2007, 19:19) *

Mines a Guinness, thanks. wink.gif

I have one kind of working right now that only encodes 'preset cbr 96'. Is that what you want? I'll need to test it a bit more but right now it ignores settings in CDex and simply proceeds to encode at 'preset cbr 96'. Let me know. smile.gif

You are saying that it ignores any switches, except input/output, right? If so, I also need the 44khz samplerate (i.e. "--resample 44100"). I also need it to encode from stdin (and most probably to stdout), I think that's how is the stream encoding handled, but I'm guessing it takes the input/output switches "normally"? (I'm not sure what exact command line Oddcast sends to the Lame dll)
Thanks for your help smile.gif

(edit- typo)
john33
OK, try this: http://homepage.ntlworld.com/jfe1205/lame-...-specialDLL.zip

Let me know how it goes. I've 'hard-wired' a sample rate of 44,100 and preset cbr 96. The i/o is handled outside the dll. The dll simply processes data passed to it and passes the results back out again.
jmartis
QUOTE(john33 @ Jan 24 2007, 22:47) *

OK, try this: http://homepage.ntlworld.com/jfe1205/lame-...-specialDLL.zip

Let me know how it goes. I've 'hard-wired' a sample rate of 44,100 and preset cbr 96. The i/o is handled outside the dll. The dll simply processes data passed to it and passes the results back out again.

Great, I'll try it when I get home today.
jmartis
Just tried it, works great, thanks! biggrin.gif

Edit - just noticed that the quality is noticeably lower, and I found that the Oddcast client disables the bit reservoir! hmm...
john33
QUOTE(jmartis @ Jan 25 2007, 14:20) *

Just tried it, works great, thanks! biggrin.gif

Excellent. cool.gif
jmartis
Sorry to bother you again, but could it be possible to somehow "force" the use of the bit reservoir? I checked the stream, and it uses no reservoir.
I really don't know much about what Oddcast does with the stream, is it possible that it somehow "strips" the reservoir, resulting in quality decrease?
Thanks
john33
QUOTE(jmartis @ Jan 25 2007, 18:46) *

Sorry to bother you again, but could it be possible to somehow "force" the use of the bit reservoir? I checked the stream, and it uses no reservoir.
I really don't know much about what Oddcast does with the stream, is it possible that it somehow "strips" the reservoir, resulting in quality decrease?
Thanks

New compile on the same link that has the option to disable the bit reservoir removed. I've no idea what Oddcast does, but even if it attempts to disable it, it will fail to do so.
jmartis
QUOTE(john33 @ Jan 25 2007, 21:31) *

QUOTE(jmartis @ Jan 25 2007, 18:46) *

Sorry to bother you again, but could it be possible to somehow "force" the use of the bit reservoir? I checked the stream, and it uses no reservoir.
I really don't know much about what Oddcast does with the stream, is it possible that it somehow "strips" the reservoir, resulting in quality decrease?
Thanks

New compile on the same link that has the option to disable the bit reservoir removed. I've no idea what Oddcast does, but even if it attempts to disable it, it will fail to do so.

Thanks John, you're a great help, works better now smile.gif

(however, it still sounds a bit weird, I think Oddcast is sending some weird quality-related switches to the Lame dll, so I think it would be wiser to disable all quality switches in the dll. But I really don't want to be asking too much from you, since the quality is "OK" as it is now smile.gif )
john33
OK, one last compile on the same link!! smile.gif If this doesn't do it you're out of luck as there's nothing else left to disable that could be affecting the quality!! wink.gif
jmartis
QUOTE(john33 @ Jan 25 2007, 22:32) *

OK, one last compile on the same link!! smile.gif If this doesn't do it you're out of luck as there's nothing else left to disable that could be affecting the quality!! wink.gif

Thanks, works like a dream now!! biggrin.gif
john33
sweat.gif wink.gif
jmartis
hmm.. I thought I can still hear some quality problems, and I was saying myself that I really just think it, but when I then checked the stream in Encspot - I saw that nearly 50% of all frames use simple stereo! (tested on many tracks). This is certainly *not* normal at 96kbps... wonder what is causing it. I think forcing the joint stereo (-m f) in the dll would help it, but I really don't mean to be annoying tongue.gif
robert
I'm not familiar with Winamp/Oddcast, but from what I saw somewhere, there should be some "set Lame options" dialog.
john33
OK, new compile on same link, as requested. wink.gif
jmartis
Thanks John, works great.
(the quality is still somewhat different that when I encode with the exe, but why, only God knows...)
QUOTE(robert @ Jan 27 2007, 14:47) *

I'm not familiar with Winamp/Oddcast, but from what I saw somewhere, there should be some "set Lame options" dialog.

it does not, I asked on Oddcast forums about that (there are some options such as quality/lowpass/reservoir in the config file but they do absolutely nothing).
robert
Are oddcast sources available somewhere? It would make much more sense to fix oddcast's config dialog and default settings.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.