Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
Help building batch Ogg, ape encoder/decoder without dll's with vi
post Dec 28 2010, 16:23
Post #1

Group: Members
Posts: 1
Joined: 28-December 10
Member No.: 86871

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
Go to the top of the page
+Quote Post
post Dec 28 2010, 19:19
Post #2

Group: Members
Posts: 108
Joined: 3-March 06
From: this planet
Member No.: 28235

Use any Linux distro and shell (bash scripting).
Go to the top of the page
+Quote Post
post Dec 28 2010, 20:07
Post #3

Group: Members
Posts: 22
Joined: 12-May 10
Member No.: 80595

QUOTE (birdie @ Dec 28 2010, 19:19) *
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.
Go to the top of the page
+Quote Post
post Dec 28 2010, 21:50
Post #4

VorbisGain developer

Group: Developer
Posts: 142
Joined: 10-January 02
Member No.: 973

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.
Go to the top of the page
+Quote Post
post Dec 29 2010, 03:14
Post #5

Group: Members
Posts: 5675
Joined: 2-September 02
Member No.: 3264

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.
Go to the top of the page
+Quote Post
post Dec 29 2010, 11:51
Post #6

Group: Super Moderator
Posts: 1293
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561

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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 1st December 2015 - 11:28