QUOTE (Omion @ Oct 21 2007, 14:03)

QUOTE (tgoose @ Oct 21 2007, 03:42)

I can't make this, I get a long output:
...
This is on Ubuntu Gutsy, I installed the ocaml and a few other packages to be on the safe side. I have absolutely no idea about ocaml so I may be doing something idiotic.
Run "make OBJ_EXT=.o" instead of just "make"
mp3packer uses a C file for changing priority, which will compile to a .obj file on Windows, but a .o file on everything else. I couldn't find a way to handle both cases automatically, so it has to be specified on the command line.
This might make it less instead of more portable, but if you use the C compiler directly instead of having ocamlopt call the C compiler, you can set the object file name.
change from:
c_part$(OBJ_EXT): c_part.c
ocamlopt c_part.c
to:
c_part$(OBJ_EXT): c_part.c
$(CC) $(CFLAGS) -c -o $@ $^
Oh, there's an ocamlopt option -ccopt. Maybe -ccopt "-o $@" would work. If you're not familiar with Makefile implicit variables, you could just write it out ("-o c_part$(OBJ_EXT)"). I like writing compact makefiles that use pattern rules, like
CODE
%.cmx: %.ml
[tab] ocamlopt -c $^
%.$(OBJ_EXT): %.c:
[tab] $(CC) $(CFLAGS) -c -o $@ $^
...
mp3info.cmx: expandarray.cmx mp3types.cmx pack.cmx mp3read.cmx mp3info.ml
crc.cmx: crc.ml
pack.cmx: pack.ml
...
You just tell make about the dependencies, and it puts them all on the command line automatically. (because that's what $^ expands to.) See the make info page...
Also, I'd suggest removing the --nice option altogether when it's not going to do anything. Currently the help lies, because --nice does nothing on non-win32. Or you could look at setpriority(2).
CODE
#include <sys/time.h>
#include <sys/resource.h>
...
setpriority(PRIO_PROCESS, 0, 10);
Nice job on a neat program. I had no trouble with it on Ubuntu Gutsy (amd64).
However, what I was really looking for when I found this thread was a program to turn a stereo mp3 into a mono mp3 by dropping one of the channels. I have some audiobooks which someone foolishly encoded as stereo (and not even joint stereo). It's only 80kb/s with some noticeable artifacting, so I don't want to transcode it.
I already found earlier in this thread that you were going to add that feature to mp3packer, but it was incompatible with the design of the program. Do you know of any other program that could do it? Or would you consider making a separate tool to do it? Or maybe just not have mp3packer be able to optimize the hell out of an mp3 at the same time its dropping channels. So making an optimized mp3 would be a two step process.