PDA

View Full Version : Generic CLI and lame.exe - codec error



ulillillia
12-14-2006, 05:56 AM
I've had a lot of trouble with trying to use dBpowerAMP with the Generic CLI thing (that uses lame.exe) to convert to ABR since I don't know of any other program that does. These 6 screenshots I took explain just what I'm doing:

Screenshot *1 (http://www.ulillillia.us/temporary/lameencoderissues01.png) - I use the little program I have in the background to generate the WAV files (of which only the sample rate and "bytes per second" values are changed in each - to change the speed without lossy effects from modifying the wave). The files play back in any program (Audacity and Winamp) without any problems so it's not the program or the files being faulty. To convert using the program I've had trouble with, I open it as shown in the foreground. There's nothing new here.

Screenshot *2 (http://www.ulillillia.us/temporary/lameencoderissues02.png) - I open a file to try testing it with. I only need one file at the moment for testing. The details are shown in the screenshot of the one I chose.

Screenshot *3 (http://www.ulillillia.us/temporary/lameencoderissues03.png) - Here, I'm choosing to locate the encoder, lame.exe in this case. Still no problems.

Screenshot *4 (http://www.ulillillia.us/temporary/lameencoderissues04.png) - I put in the details I need. I want average bit rate of (ABR) 24 Kbps (I'll fine-tune this later, likely from 12 Kbps to 32), I want high quality conversion, and I want the file to be resampled to 16,000 Hz, a standard sample rate compatible with MP3's. All source files are mono. When done adding the command lines, I choose to convert.

Screenshot *5 (http://www.ulillillia.us/temporary/lameencoderissues05.png) - At first the conversion seems to work as shown here, but, looks are deceiving.

Screenshot *6 (http://www.ulillillia.us/temporary/lameencoderissues06.png) - After just 3/5 of a second or so, I get this, the error, and no MP3 file is even written at all. No matter what I do or how I change the command lines, even if I use a file with a standard sample rate (i.e. 48,000 Hz), it still happens. I changed the position of the "[infile] [outfile]" thing but that didn't help either. What can I do about this?

At the moment, I've been using Audacity, but it only supports CBR encoding when I'm really after ABR. These are my requirements, in order of most important to least important:

1. It must support nonstandard sample rates (convert them to either 11,025 Hz, 16,000 Hz, or rarely, 22,050 Hz, my common standards - I'd use 8000 for the very slow speeds but my MP3 player doesn't play it back properly even with 64 Kbps CBR). Something like 19,583 Hz is certainly not a standard sample rate and neither is 35,782. This seems quite commonly supported.
2. It must not cut off the beginning and ending of songs. Many such converters tend to cut off the beginning half second and ending 3 or 4 seconds and this would cut off this amount of the song. Audacity doesn't do this. This, however, seems surprisingly common and may limit my choices quite well. My songs have been cropped so that they loop seemlessly without any "ticks", sudden pauses or skips. Even a tenth of a second missing is too much.
3. It must be free and not have any trial effects on it. The Generic CLI thing works well for this part.
4. It must be able to batch convert WAV to MP3. This seems quite common.
5. It must never convert my mono files into stereo files - it not only wastes space, but it significantly increases the distortions due to twice the amount of data needed increasing the Kbps value defeating the purpose). Only one program has had this issue, out of about 10 or so I've used.

Deano
12-14-2006, 09:13 AM
You problem is when you are setting up the CLI encoder. Your string for configuring LAME is inaccurate. Try:

--abr 24 -h --resample 16 [InFile] [OutFile]

Please note differencing in order of the commands, and also the CASE of the [InFile] and [OutFile] sections.

ulillillia
12-14-2006, 09:56 AM
Well, I tried the case of swapping the order (to what you had) and that didn't work then I changed the capitalization and again, I get the same exact thing. No MP3 file is even created even though the progress indicator reaches 9%.

Wayne
12-15-2006, 07:00 AM
Have you tried running lame.exe from a command line to see if it works standalone?

Wayne

ulillillia
12-18-2006, 01:00 PM
Sorry I took so long, I forgot about these forums (as I forgot to "bookmark" them). Yeah, lame.exe does indeed work, though, not through "start > run", but using a BAT file:



for %%i in ("C:\My Documents\Songs for MP3\source files\to convert\*.wav") do "C:\My Documents\Special Programs\WAV to MP3 converter\lame\lame.exe" --abr 21 -h --resample 16 "%%i" "C:\My Documents\Songs for MP3\source files\to convert\%%~ni.mp3"


I then just save it as *.bat (where * is whatever filename I want), then double-click it and it processes everything exactly as I was hoping for (and 3 times faster than Audacity could). Since the built-in encoder works as is (the one with a 30-day limit on it), and lame.exe works only if I use a BAT file (or something). I suspect, given this, that it's either the Generic CLI at fault, a faulty link with dBpowerAMP, or a combination of these two.

18 Kbps ABR is the starting point (while going down from 32 Kbps ABR) where I can detect distortions (silence only - not detectible with 12 Kbps over my noisy CPU fan) so I'm using 21 as the basis, a little higher to counter it with room to spare in case of oddballs.