A tool to convert a CHD CD image file to OGG/BIN/CUE files.
Unlike most OGG encoders, the output of CHDtoOGG is standardized and bit-exact regardless of hardware or system used to run the encoder.
You can find a download for Windows under the Releases page.
For other platforms, check the section on compiling.
The tool is used in the command prompt with input and output file required:
CHDtoOGG v1.0 - Command line options:
-i <PATH> : Path to input CHD file (required)
-o <PATH> : Path to output CUE file (required)
-q <LEVEL> : Quality level 0 to 10, defaults to 8
-n : Output an empty data track
-x : Print XML DAT metadataExample:
CHDtoOGG -i "Game (USA).chd" -o "Game (USA).cue"
The -i path.chd option must be set and specify an uncompressed version 5 CHD file (created with chdman createcd -c none) with CD tracks that should be converted to CUE/BIN/OGG.
The -o path.cue option must be set and specify the name of the .cue file to be generated. The CD tracks in the CHD file are then output next to the .cue file in the following format:
- path.cue - The cue file which acts as the index file for the CD tracks
- path (Track 1).bin - The data track (which can either be from the source or empty
- path (Track N).ogg - The audio tracks in OGG Vorbis format
The optional -q LEVEL option can specify a different quality level than the default level of 8.
| Quality Level | Nominal Bitrate |
|---|---|
-q 0 |
64 kbit/s |
-q 1 |
80 kbit/s |
-q 2 |
96 kbit/s |
-q 3 |
112 kbit/s |
-q 4 |
128 kbit/s |
-q 5 |
160 kbit/s |
-q 6 |
192 kbit/s |
-q 7 |
224 kbit/s |
-q 8 (default) |
256 kbit/s |
-q 9 |
320 kbit/s |
-q 10 |
500 kbit/s |
If specifying the optional -n option, the files on the original data track will be discarded and just a tiny, empty .BIN file will be output.
This can be used to keep the track layout of the original CD when only the audio tracks are desired.
If specifying the optional -x option, the program will output XML DAT metadata to be contributed to the DAT project.
On Windows open the Visual Studio solution and press build.
For other platforms use either ./build-gcc.sh or ./build-clang.sh to compile the tool for your system.
To make the OGG Vorbis encoding deterministic across platforms and systems, this project uses a precompiled version of the OGG Vorbis encoder by Xiph which has been compiled to webassembly and reverse transpiled back to C. The final processed version is EncodeVorbis.wasm.cpp. You can find the original source code of the encoder in the EncodeVorbis directory. Although a new version of the encoder should not be generated unless breaking of compatibility with all outputs generated so far is acceptable. Using different versions of compilers or tools, or different methods to generate the code also can lead to breaking of compatibility because different kinds of code optimizations can lead to different results in the encoding process.
The project is distributed under the 3-Clause BSD License, same as libogg and libvorbis.