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: Help with acdir and lame (Read 9722 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help with acdir and lame

Hi,

what I'm trying to do is using a wav image + cuesheet as input for lame to automaticly create files using the "--nogap" option.

I found info about lame with cuesheet input here. The patch is outdated and it's successor is "acdir" which interprets and pipes the cuesheet to lame or other encoders.

Now, I want to to exactly the same thing the patch did with acdir: Take an image and encode it to a series of files using the --nogap option, but acdir seems to refuse the setting of --nogap or better: it parses it to lame but no mp3s are created.

I know that --nogap is quite a cripple workaround, but I'd still like to be able to create mp3s that play gapless on hardware players, that don't read the lame info tag, in one step - you know most don't...

Anyone has got the same problem as I have an solved it?

Regards; ilikedirt

Help with acdir and lame

Reply #1
I'm not really familiar with --nogap - however I see that it requires you to pass all files in one command line to LAME.

ACDIR works by passing data to LAME one track at a time - so I don't see how it could work in one step.

The way I see it, you need to get ACDIR to split the wave to track waves (using --extract), and then use something like GLOB.EXE to send them all to LAME - and then presumably delete the temporary track waves.

Whether this multi-step process (which could be done easily with a batch file) is to your taste, or whether there are simply easier ways of going about things, is another matter.

If this process is acceptable I'm sure we could help with comand lines if you have problems.
I'm on a horse.

Help with acdir and lame

Reply #2
Thank you! I thought acdir was somehow able to parse the data in one commandline as the patched lame would be. Where can I find this GLOB.EXE? I might not need acdir at all...

Basicly I just don't want to have to parse the files to lame in one commandline manually like this

lame --other_options --nogaptags --nogap track01.wav track02.wav track03.wav ...

EDIT: I think I found GLOB.EXE - will be playing with it a bit and report back if I have any problems   

EDIT2: Hm GLOB doesn't have much variables. Is it possible to parse the list of files glob displays into a single lame commandline? 

EDIT3: I also tried creating one big mp3 + cue and cutting it using Musiccutter. Works fine, exept it ruines the tags (no biggie copy these with foobar) and the vbr header is of course wrong (I can also fix this with foobar but it only works file per file not on a number of files...)

Thanks so far...

Help with acdir and lame

Reply #3
Your GLOB command would be something like:

GLOB.EXE -c LAME.EXE -V2 --vbr-new --nogaptags --nogap *.wav

I.e:

GLOB -c <command> <file pattern>
I'm on a horse.

Help with acdir and lame

Reply #4
The combined commands may be something like:

ACDIR.EXE -o "mp3\%n - $~t.wav" --extract CDImage.cue

GLOB.EXE -c LAME.EXE -V2 --vbr-new --nogaptags --nogap mp3\*.wav


Those commands assume that everything is all in the same directory (files and apps), or that the apps are in your PATH (i.e.: system32).

As you can probably see, this will set ACDIR to extract all tracks to a folder called "mp3", and then use GLOB to pick up only those waves in "mp3" and pass them in a list to LAME's --pregap switch.

Edit: The main problem I can see with this is that you are losing the ability to tag the files using ACDIR's variables.  Maybe you could somehow use Tag as a third command to then tag the files - either from filename, or maybe an external file.  I'm not that up on tagging from a file but I believe that Tag can do it.
I'm on a horse.

Help with acdir and lame

Reply #5
Quote
Your GLOB command would be something like:

GLOB.EXE -c LAME.EXE -V2 --vbr-new --nogaptags --nogap *.wav

I.e:

GLOB -c <command> <file pattern>
[a href="index.php?act=findpost&pid=348983"][{POST_SNAPBACK}][/a]


Hi again  Yes, exactly what I was looking for  but: doesn't seem to work here... I have GLOB and LAME in the PATH but using the command

Code: [Select]
glob -c lame *.wav


GLOB only lists the files but does not start encoding through lame  GLOB is not very verbose

Loosing tags is no problem I'll use TAG in a batch file.

Thanks for you help! If I get this to work I'll add it to the rockbox wiki to simplify other people's lifes

EDIT: Maybe the topic title is a bit misleading now... I don't think I need acdir

Help with acdir and lame

Reply #6
Quote
Code: [Select]
glob -c lame *.wav
Won't work

Code: [Select]
glob -c lame --nogap *.wav


..will.  (as long as you are running the command from the same directory in which the wave files reside.)
I'm on a horse.

Help with acdir and lame

Reply #7
No sorry, still dosn't work. 

I tried

Code: [Select]
glob -c lame --nogap *.wav


output is:

lame
--nogap
01.wav
02.wav
03.wav

 

Help with acdir and lame

Reply #8
I can't find any mention of the --nogap switch on the official site's documentation and this leads me to believe that it may be outdated or useless. Gapless playback is already included in LAME-encoded MP3s by way of the encoder delay and padding tag fields.

What purpose do you wish to use this switch for and do you have the documentation describing it?

Help with acdir and lame

Reply #9
Quote
I can't find any mention of the --nogap switch on the official site's documentation and this leads me to believe that it may be outdated or useless. Gapless playback is already included in LAME-encoded MP3s by way of the encoder delay and padding tag fields.

What purpose do you wish to use this switch for and do you have the documentation describing it?
[a href="index.php?act=findpost&pid=349174"][{POST_SNAPBACK}][/a]


--nogap is still there. it's in lame --longhelp. As I understand it, it fills the encoder padding space with the beginning of the following track. Of course this is useless on devices that interpret the lame tag - it's just that only the Rio Karma and rockbox devices do so...

Help with acdir and lame

Reply #10
Quote
I can't find any mention of the --nogap switch on the official site's documentation and this leads me to believe that it may be outdated or useless.
I couldn't see any mention of it in the HTML docs either, but as ilikedirtthe2nd says, it is listed under --longhelp.

Also, I tend to test any command line that I suggest to members, as I don't like to be dishing out false information.  I have tested --pregap and, although I haven't tested the gapless nature, I can confirm that LAME does not complain.

Quote
No sorry, still dosn't work. 

I tried

Code: [Select]
glob -c lame --nogap *.wav


output is:

lame
--nogap
01.wav
02.wav
03.wav
I don't understand - that command was tested and works fine for me.

I really don't understand the output that you get.

You don't have a batch file called "lame.bat/.cmd" in the same folder or anything?

FYI I am using GLOB that comes with REACT.  If I run GLOB on its own I see:

Code: [Select]
Glob - A file globbing utility
   Algorithm and original implementation by Matthias Wandel (MWandel@rim.net)
   Extensions and C++ interface by Joshua Jensen (jjensen@workspacewhiz.com)
   Minor additions by Tycho

Usage: Glob -i pattern patterns
  -e pattern = Exclusive pattern.  All ignore patterns are not used.  Only
               files matching the exclusive pattern are counted.
  -i pattern = Ignore patterns of the name [pattern].  Close with a
               forward slash to ignore a directory.
  -c         = Execute as a command. First file is taken as the executable.
  -v         = Verbose the command that is executed when using -c.
I'm on a horse.

Help with acdir and lame

Reply #11
Seems like I have downloaded an other / different version of GLOB. I will download REACT then it should finally work

OK works now, the glob.exe in REACT is a modified version... Thank you for your help

Help with acdir and lame

Reply #12
Ah, good news.

I've only now noticed the "Minor additions by Tycho" part.

I'm sorry, I should have noticed this earlier - it would have eased the pain some.
I'm on a horse.

Help with acdir and lame

Reply #13
Oh, thanks for letting me know.  It's just I hadn't seen it mentioned before.