I would recommend that you research this a bit with google.
It doesn’t appear you will find anything with declares since this is not a format supported directly by the different operating systems; and iTunes, quicktime, etc require plugins in order to play the ogg format. Xojo, which uses built in libraries to play sounds, will also not be able to play ogg files. Since it is not built in, it cannot be done through the shell unless a command line utility which supports conversion to ogg is installed on a user’s computer. This leaves you with plugins, installing command line utilities, or not using the ogg format.
May I ask why you want to use the ogg format?
As a side note - converting from one lossy format (i.e. mp3) to another (ogg) is generally discouraged because it can cause a noticeable decrease in sound quality.
[quote=100610:@Jason King]I would recommend that you research this a bit with google.
It doesn’t appear you will find anything with declares since this is not a format supported directly by the different operating systems; and iTunes, quicktime, etc require plugins in order to play the ogg format. Xojo, which uses built in libraries to play sounds, will also not be able to play ogg files. Since it is not built in, it cannot be done through the shell unless a command line utility which supports conversion to ogg is installed on a user’s computer. This leaves you with plugins, installing command line utilities, or not using the ogg format.
May I ask why you want to use the ogg format?
As a side note - converting from one lossy format (i.e. mp3) to another (ogg) is generally discouraged because it can cause a noticeable decrease in sound quality.[/quote]
It is so sounds can be played in Firefox. I have read that browser support for MP3 isn’t good and therefore I am recommended to use OGG.
[quote=100610:@Jason King]I would recommend that you research this a bit with google.
It doesn’t appear you will find anything with declares since this is not a format supported directly by the different operating systems; and iTunes, quicktime, etc require plugins in order to play the ogg format. Xojo, which uses built in libraries to play sounds, will also not be able to play ogg files. Since it is not built in, it cannot be done through the shell unless a command line utility which supports conversion to ogg is installed on a user’s computer. This leaves you with plugins, installing command line utilities, or not using the ogg format.
May I ask why you want to use the ogg format?
As a side note - converting from one lossy format (i.e. mp3) to another (ogg) is generally discouraged because it can cause a noticeable decrease in sound quality.[/quote]
SOX looks like it might work for this. It is cross platform and allows different types of audio manipulation.
[quote=100610:@Jason King]I would recommend that you research this a bit with google.
It doesn’t appear you will find anything with declares since this is not a format supported directly by the different operating systems; and iTunes, quicktime, etc require plugins in order to play the ogg format. Xojo, which uses built in libraries to play sounds, will also not be able to play ogg files. Since it is not built in, it cannot be done through the shell unless a command line utility which supports conversion to ogg is installed on a user’s computer. This leaves you with plugins, installing command line utilities, or not using the ogg format.
May I ask why you want to use the ogg format?
As a side note - converting from one lossy format (i.e. mp3) to another (ogg) is generally discouraged because it can cause a noticeable decrease in sound quality.[/quote]
Do you know if these commands are cross platform (as in you can execute the same code in the command line of each OS)?
You don’t set it up, you need to have binary executables for each platform you want to distribute on. You need them to be static builds as well, to have everything self-contained. Unless you’re using a default ffmpeg build you can’t assume the user has the same as you require.
Then you run the above from a shell.
I have used sox for this (for demuxing audio from videos, and composing a new tagged m4v with the AAC audio)
Be aware: if you are going to use ffmpeg, sox, … in a commercial app, keep in mind it has legal issues. Although ogg is free, several other codecs are not.
[quote=100673:@Axel Schneider]You can see here how I did it with commandline tools (lame and afconvert)
(made for OSX)
you can customize it for windows
[quote=100673:@Axel Schneider]You can see here how I did it with commandline tools (lame and afconvert)
(made for OSX)
you can customize it for windows
The best internal solution is to make a dylib and DLL, or a Xojo plugin, and compile the Vorbis C++ code into it. Vorbis (which is what OGG is) is open source and you can use it.
Personally, I haven’t done this yet (otherwise I’d help you directly), because compiling these types of things can be difficult o aso annoyingly complex your brain hurts. This is in part what Christian MBS does so well. Perhaps he’d do it, get a hold of him.
What the other responders are suggesting is the easy approach where you aren’t even doing things within your app - youa re telling another to do it for you transparently. AFCONVERT is really handy and I use it that way, within a shell, and it’s almost essential because it’s one of the only ways to deal with Apple Lossless audio (although I could do it within C++ code calling CoreAudio directly), but again, sometimes you don’t want the extra work.
And also, there isn’t always command line apps for both platforms.
A shell script would be different. In Windows it would be a BAT file, in a completely different format.
But you shouldn’t need to run shell scripts. You’re running, I believe, standalone commands. You should be able to replicate their functionality using Windows equivalents of the executables.
How do I install LAME? I am allowed to use it for commercail purposes in this method if I distribute my software as a commercail product which is not exclusively the LAME encoder itself. Thanks