Unofficial Vorbis-related Patches
Hi, this is the home of unofficial patches for Vorbis and other Xiph.org
related projects which have not been (and may never be) committed to
CVS. If you have other patches you would like to see here, please
email Stan Seibert (volsung@xiph.org). Unless
otherwise specified, these patches are under the same license as the
software they modify.
(Disclaimer: These patches are NOT endorsed by Xiph.org and may destroy your data, life, and loved ones. Use at your own risk!)
FLAC reader for oggenc (Updated August 23, 2003)
Files
Description
This patch allows oggenc to read audio data from a FLAC (both native and the Ogg FLAC variety) file. By default, comments stored
in the FLAC comment metadata block are copied into the resulting Ogg
Vorbis file, thereby preserving your title, artist and other tags. This behavior can be disabled using the --discard-comments option which forces oggenc to ignore the FLAC comments.
UNIX Instructions
- Make sure that FLAC 1.0.4 or later, libvorbis and libogg are installed.
(If you also want to build ogg123, you will need libao and libcurl.)
If you are using a package based Linux distribution, make sure that
the development packages are installed.
- Checkout vorbis-tools from Xiph.org CVS.
- Copy oggenc_flac.patch to the vorbis-tools/ directory
- cd to the vorbis-tools directory.
- patch -p1 < oggenc_flac_2.patch.
- ./autogen.sh
- Look at the output to make sure that errors like "libFLAC missing" and "libFLAC headers missing" are not displayed.
- make
- make install (Optional, of course. You can just cd oggenc to play with oggenc without overwriting your existing one.)
- You now have a FLAC-enabled oggenc! Try it out: oggenc test.flac.
Win32 Instructions
- Download oggenc-flac-build.zip and unzip it. The
oggenc-flac-build directory contains the already-patched source code
for oggenc in the vorbis-tools/oggenc/ directory as well as the
precompiled Win32 libraries for both Ogg Vorbis and FLAC (downloaded
from their respective websites).
- Open oggenc-flac-build\vorbis-tools\win32\oggenc.vcproj in
VisualStudio.NET. (Sorry, I don't have access to VC++6 to make
project files.)
- Make sure the active configuration is "Release". The
precompiled FLAC libraries are not linked with the Debug Runtime, so
the "Debug" configuration will not work unless you recompile your own
FLAC libraries.
- Build the oggenc project. oggenc.exe should be placed into the
oggenc-flac-build\vorbis-tools\win32\Release\static\ folder.
- You now have a FLAC-enabled oggenc! Try it out: oggenc test.flac.
Warnings
- This will only build on FLAC 1.0.4 or later. FLAC 1.0.3 has a different API.
- There appear to be some lingering rounding issues (not audible, but still curious).
- Unsigned sample formats are not handled yet.
- ID3 tags are not parsed, and in fact ID3v2 tags at the beginning of your file will cause it to be rejected by oggenc.
- Bug causing comments to be incorrectly copied has been fix on patch version 2. This lead to some crashing on Windows as well.