HydrogenAudio

Lossy Audio Compression => Ogg Vorbis => Ogg Vorbis - General => Topic started by: razor8 on 2010-12-28 15:23:08

Title: Help building batch Ogg, ape encoder/decoder without dll's with vi
Post by: razor8 on 2010-12-28 15:23:08
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
Title: Help building batch Ogg, ape encoder/decoder without dll's with vi
Post by: birdie on 2010-12-28 18:19:37
Use any Linux distro and shell (bash scripting).
Title: Help building batch Ogg, ape encoder/decoder without dll's with vi
Post by: XQYZ on 2010-12-28 19:07:30
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.
Title: Help building batch Ogg, ape encoder/decoder without dll's with vi
Post by: Lear on 2010-12-28 20:50:10
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.
Title: Help building batch Ogg, ape encoder/decoder without dll's with vi
Post by: saratoga on 2010-12-29 02:14:48
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.
Title: Help building batch Ogg, ape encoder/decoder without dll's with vi
Post by: Kohlrabi on 2010-12-29 10:51:10
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 (http://kemovitra.blogspot.com/2010/04/mingw-to-compile-vorbis-tools.html). 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.