Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Custom control/front end DLL for Lame dll? (Read 19109 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Custom control/front end DLL for Lame dll?

Hello, would it be possible to make a "front-end" dll to control existing Lame dll,
Here's what the front end DLL would do:
1) it would accept a normal Lame command line
2) it would add a command line from external txt file and keep only the file related settings (infile/outfile) from the input command line
3) it would pass this modified cmd line to existing Lame dll.

Reason for this is that I want to use Oddcast (now Edcast) for sending mp3 stream, and it does not allow any settings on the mp3 encoder, and probably passes some exotic switches which I'm not aware of, messing up the quality.

Custom control/front end DLL for Lame dll?

Reply #1
How about "lame_enc.dll modified to use INI file setup" ?

Custom control/front end DLL for Lame dll?

Reply #2
How about "lame_enc.dll modified to use INI file setup" ?

I just looked up that, it's close but not exactly what I need. I'd like to be able to set up more parameters than just "Preset, Stereo, Scalefactor and Experimental Y options to be used in encoding". And I'd like to use another Lame version which I found works better for low bitrate CBR encoding with my music.

But thanks anyway, if I can't get what I'm crying for  , I'll use the modified DLL.

Custom control/front end DLL for Lame dll?

Reply #3
What LAME version and setting would that be?

Custom control/front end DLL for Lame dll?

Reply #4
What LAME version and setting would that be?

With the answers to these questions, it becomes a definite 'maybe'!!  Adding to the number of options exposed within the ini file is relatively straightforward and, if you particularly want it compiled against a specific lame library, that should be simple enough depending on the library.

Custom control/front end DLL for Lame dll?

Reply #5
I'm almost afraid to post any custom commandlines here 

But this is a setting which works well on most of my trance tracks:
Lame 3.89
Code: [Select]
-b96 -q1 --nspsytune --resample 44 --lowpass 16 --ns-bass -4 -X1

Also works good:
Lame 3.93.1
Code: [Select]
--alt-preset cbr 96 -q1 --lowpass 16 --resample 44 --ns-bass -2 -X1


Of course these are experimental switches so that's why I wanted to have external txt file with the command line if I wanted to make changes. But even if someone could make a Lame DLL with the fixed command line, I would be thankful for this too 

(I remember asking john33 a long time ago for such modded dll, but 1) the command line was different 2) the Oddcast DSP still managed to "push through" some switches which audibly altered the quality in some cases).


Thanks for any help

Custom control/front end DLL for Lame dll?

Reply #6
Well, the options shouldn't be a problem. The only available 3.89 code is beta, but I have that and 3.93.1. I'll go back to the dll code that came with those and look at modifying it. Leave it with me for a couple of days and I'll get back to you.

Custom control/front end DLL for Lame dll?

Reply #7
Well, the options shouldn't be a problem. The only available 3.89 code is beta, but I have that and 3.93.1. I'll go back to the dll code that came with those and look at modifying it. Leave it with me for a couple of days and I'll get back to you.

Thank you very much John, you are always to help!  Yes you are right it is beta.

The only thing I'm afraid of is that these setting are slooow (2x realtime at most) and that the audio might "stutter". I guess we'll see, and if there are any problems with that  well I'm just building a new powerful PC, that should take care

P.S. I don't need both, I slightly prefer the sound of 3.89 so that's all I need.

Custom control/front end DLL for Lame dll?

Reply #8
Did you do an ABX compare to the most recent lame version? Perhaps you will be surprised how good the presets sound.

Custom control/front end DLL for Lame dll?

Reply #9
Another Oddcast user here. I also would like to see a lame_enc.dll with all the options exposed in a text file.

Custom control/front end DLL for Lame dll?

Reply #10
Another Oddcast user here. I also would like to see a lame_enc.dll with all the options exposed in a text file.

All seems a bit excessive!  But if you could provide a list of those you would like to have available, I'll see what I can do.

If anyone else has any requests regarding this, let's have them all together for the sake of minimising effort.

Custom control/front end DLL for Lame dll?

Reply #11
Did you do an ABX compare to the most recent lame version? Perhaps you will be surprised how good the presets sound.

I did not do an ABX test but I did extensive testing and comparing on my killer samples and real trance songs. At 96kbs you really do not need to do an ABX test as the artifacts are ultimately obvious at this bitrate, and I already know which LAME version makes which artifacts @96kbs


@john33, It's perfectly fine for me if you do only the 3.89 cmd line as I put above, just please disable any switches from the input cmd line except infile/outfile, thanks

Custom control/front end DLL for Lame dll?

Reply #12
All seems a bit excessive! But if you could provide a list of those you would like to have available, I'll see what I can do.

Thank you. There are actually not that many quality-related options, most deal with I/O and tagging. Are you be doing entire command lines or individual presets?
I'd like to see -V (already done in the latest version), -b, -B, --lowpass, -q

Custom control/front end DLL for Lame dll?

Reply #13
OK, guys, thanks for your input. I'll see what I can do.

Custom control/front end DLL for Lame dll?

Reply #14
OK, here is a 3.98 version that I think covers everything asked for: http://rarewares.org/files/mp3/lamedll_MOD3.98.zip

If this is OK, I'll look at a 3.93.1 version, but I'd like to know whether this works as required, first.  (Check the new ini file as the options have expanded, obviously!)

Custom control/front end DLL for Lame dll?

Reply #15
Thank you for this release. It works well.

My plan is to stream real radio over LAN (hence --lowpass) and I just discovered that -V2 is not transparent. 

Custom control/front end DLL for Lame dll?

Reply #16
Thank you for this release. It works well.

My plan is to stream real radio over LAN (hence --lowpass) and I just discovered that -V2 is not transparent. 

OK, thanks. I'll look at moving this to 3.93.1 in the next couple of days.

Custom control/front end DLL for Lame dll?

Reply #17
I want to use Oddcast (now Edcast) for sending mp3 stream, and it does not allow any settings on the mp3 encoder, and probably passes some exotic switches which I'm not aware of, messing up the quality.

I just checked the output of official LAME 3.97 DLL / latest Edcast, and it did not use the bit reservoir at all. A 96 kBit stream came out full of \0 and the lame id string, when these bytes could be spent for quality instead. I wonder what could be the reasoning behind this choice. Yes, the first couple frames will play distorted, but it's not like the listeners restart playback every minute.

A quick browse over the Icecast directory revealed two servers still publicly 'casting in this format.


john33, what is the format of the resample option? It does not do anything. Edcast's built in resampler (BASS?) is unusable – produces clicks.

Custom control/front end DLL for Lame dll?

Reply #18
Quote
john33, what is the format of the resample option? It does not do anything.

BUMP.

I'll correct myself. The parameter works, but the host application is able to override it. This shouldn't be happening.

Custom control/front end DLL for Lame dll?

Reply #19
Quote
john33, what is the format of the resample option? It does not do anything.

BUMP.

I'll correct myself. The parameter works, but the host application is able to override it. This shouldn't be happening.

Sorry about that!  I've corrected that and there's a new compile here: http://rarewares.org/files/mp3/lamedll_MOD3.98.zip

Custom control/front end DLL for Lame dll?

Reply #20
The problem is now corrected. Thank you. 

Custom control/front end DLL for Lame dll?

Reply #21
Just curious - there are apparently two versions available: lame_dll_MOD3.98.zip (dated 11-Aug-2008) and lamedll_MOD3.98.zip (dated 19-Aug-2008). The 2nd one seems to accept more options. From Rarewares, only the 1st one is linked. I'm wondering which one to use 

Custom control/front end DLL for Lame dll?

Reply #22
Just curious - there are apparently two versions available: lame_dll_MOD3.98.zip (dated 11-Aug-2008) and lamedll_MOD3.98.zip (dated 19-Aug-2008). The 2nd one seems to accept more options. From Rarewares, only the 1st one is linked. I'm wondering which one to use 

Use the more recent one. It will be replacing the earlier one. I was just waiting to be sure there weren't any issues that needed attention.

Custom control/front end DLL for Lame dll?

Reply #23
I'd like to see -V (already done in the latest version), -b, -B, --lowpass, -q
IIRC all those options were included in the ordinary (not the ini file setup modified) lame_enc.dll before except for --lowpass, am I wrong?

john33, can you suggest the best TAGing option for making MP3 through lame_enc.dll ? Including such a command line in the dll doesn't make any sense:
Code: [Select]
--id3v1-only --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d
...I don't have a clue...
Sorry for my poor English, I'm trying to get better... ;)
"The greatest trick the Devil ever pulled, was convincing the world he didn't exist."

Custom control/front end DLL for Lame dll?

Reply #24
I'd like to see -V (already done in the latest version), -b, -B, --lowpass, -q
IIRC all those options were included in the ordinary (not the ini file setup modified) lame_enc.dll before except for --lowpass, am I wrong?

They were all available to an application using the dll, but the point of the ini file version is that the options are configured within the ini file rather than by the application that uses it. In fact, the application set options are ignored.
john33, can you suggest the best TAGing option for making MP3 through lame_enc.dll ? Including such a command line in the dll doesn't make any sense:
Code: [Select]
--id3v1-only --ta "%a" --tt "%t" --tg "%m" --tl "%g" --ty "%y" --tn "%n" %s %d
...I don't have a clue...

The file i/o and any tagging are the responsibility of the calling application and, as such, are governed by what the calling application offers. The only 'tag' that is under the control of the dll in terms of whether it is written is the lame-tag.