CATCODEC(1)
β¨ NAME β¨
okay so bestie, meet catcodec(1) β an open source tool that decodes/encodes the sample catalogue for OpenTTD π like, the whole entire vibe of this lil program is sample catalogue wrangling, and honestly? she ate.
πΈ SYNOPSIS πΈ
catcodec [-d sample_file] [-e sample_file]
That's it. That's the whole invocation. Two flags, zero drama, main character energy π
π¦ DESCRIPTION π¦
so catcodec decodes and encodes sample catalogues for OpenTTD. and what even is a sample catalogue, you ask? bestie it's lowkey not much β just some meta-data (a description and a file name, that's it) plus raw PCM data. that's the whole thing. iconic minimalism, ngl.
Decoding a sample catalogue β say sample.cat β gives you back a sample.sfo that holds the file names and descriptions of the samples, PLUS all the samples themselves, each written out with the file name that's specified in the catalogue. so you get the receipts and the goods, periodt π
Encoding a sample catalogue β like sample.cat β reads sample.sfo for the file names and descriptions. then it loads up all the samples that sample.sfo describes and encodes them into sample.cat. so it's giving assemble-the-whole-squad π«Ά
Generally speaking, encoding a file and then decoding it results in the same file. fr fr. BUT β and this is the important part, don't skip it β decoding of the original, Transport Tycoon Deluxe, sample format will force the output to be 11025 Hz, 8 bits mono because the meta-data of some of the samples is incorrect or even missing. like, the OG files are lying to you a little bit π so catcodec just makes the call for you.
Only PCM WAVE files with only the format and data chunks are supported. anything else has to be converted into that first, no exceptions bestie.
Furthermore, only 11025 Hz, 22050 Hz and 44100 Hz with 8 or 16 bits per sample single channel PCM WAVE files are supported. so like... three sample rates, two bit depths, one channel. that's the menu π
π OPTIONS π
-dsample_fileβ Decode the given sample catalogue into its components. Thesample_filemust have the extension.cat. For the output meta-data file the.catis replaced with.sfo. The actual samples, in PCM WAVE format, are extracted into files using the file names, including extension, as described in the catalogue or meta-data file.
If any of the files already exists a backup is made, by adding .bak, overwriting the existing backup. so yeah β she's polite, she backs things up, but she WILL steamroll the previous backup. one backup, one chance π
-esample_fileβ Encode the components for the given sample file into a sample catalogue. Thesample_filemust have the extension.cat. For the input meta-data file the.catis replaced with.sfo. The actual samples, in PCM WAVE format, are read from files using the file names, including extension, as described in the meta-data file.
If the sample_file already exists a backup is made, by adding .bak, overwriting the existing backup. same deal, same energy, bestie π
π₯ SEE ALSO π₯
openttd(1) β the game that uses these sample catalogues. like, the reason any of this exists. go say hi π
π AUTHORS π
Remko Bijker β¨rubidium@openttd.orgβ©
and that's the whole page, bestie β written back on November 05, 2009 in the CATCODEC(1) manual, and yeah, the header said catcodec(1) and the footer said CATCODEC(1) and now you know both π slay, go encode something β¨π§
π¦ where this page comes from
- debian bookworm: catcodec 1.0.5-4+b1 Β· GPL-2.0-or-later
- debian trixie: catcodec 1.0.5-4+b1 Β· GPL-2.0-or-later
- ubuntu jammy: catcodec 1.0.5-4 Β· GPL-2.0-or-later
- ubuntu noble: catcodec 1.0.5-4 Β· GPL-2.0-or-later
- ubuntu resolute: catcodec 1.0.5-4build1 Β· GPL-2.0-or-later
- ubuntu stonking: catcodec 1.0.5-4build1 Β· GPL-2.0-or-later
- Copyright (C) 2009 Remko Bijker
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms