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 building batch Ogg, ape encoder/decoder without dll's with vi (Read 6029 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help building batch Ogg, ape encoder/decoder without dll's with vi

Hello hydrogenaudio community, i want to write a commandline tool which is able to encode wav's into ogg's or ape's and decode them back to the original wav's. im completly new to vorbis and monkey's audio, i only used bass-library before which was pretty easie to tuse. i've been trying to build(compile) oggenc and oggdec projects using Visual Studio 2010 without any success. there are allways missing headers or and other things (linkage errors) for example:
Cannot open include file: 'ogg/ogg.h': No such file or directory (even if i located the files there...)
why does a crossplattfrom project include unistd.h which isnt avaliable on windows? i've searched two days for a guide on how to compile vorbis-projects correctly, i read many threads in this forum but i just got even more confused:(

what the programm should to:
parse commandline args, the user has to define if the programm should encode or decode the input files and which compression should be used: ogg or ape (this is no problem)
generate a recursive list of all files in the current workdirectory (thats no problem, i allready coded that part), for encoding input files are allways wav's.
encode / decode the files from the list using the user specified compression mode
delete the original files.

please point me into the right direction. a guide on howto compile and integrate oggenc/oggdec and MACLib into my project.

btw: coding language is c++

thank you for your help

Help building batch Ogg, ape encoder/decoder without dll's with vi

Reply #1
Use any Linux distro and shell (bash scripting).

Help building batch Ogg, ape encoder/decoder without dll's with vi

Reply #2
Use any Linux distro and shell (bash scripting).


Haha good one, the complete thing could probably be done in 50 lines or less that way.

@topic: I'd try to use a gcc based compiler. VC++ might or might not have problems with certain OS projects as those use Standard C++ which VC++ not necessarily obeys.

Help building batch Ogg, ape encoder/decoder without dll's with vi

Reply #3
Doesn't the Ogg and Vorbis source packages include Visual C++ project files? If not, or if they're in a format not supported by your version of VC++, it sounds like one problem you have is missing/incorrect include path settings in the VC++ project.

Also, Ogg Vorbis, and many other "Unix-based" projects use autoconf and automake to handle platform dependencies. If you don't use that (as when building on Windows), you may need to edit/create a config.h file with proper defines. There should be a template (config.h.in or something) and perhaps a Windows-specific config.h in the source archive. This should fix the unistd.h problem.

Help building batch Ogg, ape encoder/decoder without dll's with vi

Reply #4
Libvorbis includes project files for VS.  If they're not working for you, then you probably want to go ask on the vorbis mailing list.  Someone there can probably double check that they're not out of date or help you fix your VS install.

That said, using VS is probably not worth it unless you know what you're doing.  You've going to constantly be fighting with MS's compiler quirks and the fact that a lot of projects don't work with VS at all.

 

Help building batch Ogg, ape encoder/decoder without dll's with vi

Reply #5
Isn't it much easier to use existing Encoders/Decoders and just call them from inside your program? You could even code your tool in something simpler like python or perl as a bonus. Otherwise compiling at least oggenc is quite easily achievable using MinGW. Make sure that you have all the needed source files, as mentioned on the page. The missing "ogg.h" leads to the conclusion that you were maybe missing libogg.
It's only audiophile if it's inconvenient.