SNDFILE-CONVERT(1)

πŸ’– SNDFILE-CONVERT πŸ’–

okay bestie, gather round, because we're talking about sndfile-convert, the sndfile-convert(1) general commands manual page, and it's giving format-shifting icon. ✨


🌸 NAME 🌸

sndfile-convert β€” convert sound files from one format to another πŸŽ€


✨ SYNOPSIS ✨

sndfile-convert [-override-sample-rate=rate]
                [-endian=little | big | cpu] [-normalize] [encoding]
                input output

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, sndfile-convert takes sound files and flips them from one audio format into another, no cap. it's the glow-up station for your audio files. πŸ’…

⚠️ heads up bestie: the output file gets overwritten if it already exists. no little "are you sure?" popup, no takebacks. she just does it. πŸ™ˆ

πŸŽ€ Formats πŸŽ€

the format of the output file is decided by the filename extension, periodt. here's the full roster of file formats she recognizes right now:

  • wav β€” WAV (Microsoft)
  • aif β€” AIFF (Apple/SGI)
  • au β€” AU (Sun/NeXT)
  • snd β€” AU (Sun/NeXT)
  • raw β€” RAW (header-less)
  • gsm β€” RAW (header-less)
  • vox β€” RAW (header-less)
  • paf β€” PAF (Ensoniq PARIS, big-endian)
  • fap β€” PAF (Ensoniq PARIS, little-endian)
  • svx β€” IFF (Amiga IFF/SVX8/SV16)
  • nist β€” SPHERE (NIST SPeech HEader Resources)
  • sph β€” SPHERE (NIST SPeech HEader Resources)
  • voc β€” VOC (Creative Labs)
  • ircam β€” SF (Berkeley/IRCAM/CARL)
  • sf β€” SF (Berkeley/IRCAM/CARL)
  • w64 β€” W64 (SoundFoundry WAVE 64)
  • mat β€” MAT4 (GNU Octave 2.0 / Matlab 4.2)
  • mat4 β€” MAT4 (GNU Octave 2.0 / Matlab 4.2)
  • mat5 β€” MAT5 (GNU Octave 2.1 / Matlab 5.0)
  • pvf β€” PVF (Portable Voice Format)
  • xi β€” XI (FastTracker 2)
  • htk β€” HTK (HMM Tool Kit)
  • sds β€” SDS (Midi Sample Dump Standard)
  • avr β€” AVR (Audio Visual Research)
  • wavex β€” WAVEX (MS WAVE with WAVEFORMATEX)
  • sd2 β€” SD2 (Sound Designer II)
  • flac β€” FLAC (FLAC Lossless Audio Codec)
  • caf β€” CAF (Apple Core Audio File)
  • wve β€” WVE (Psion Series 3)
  • prc β€” WVE (Psion Series 3)
  • ogg β€” OGG (OGG Container format)
  • oga β€” OGG (OGG Container format)
  • mpc β€” MPC (Akai MPC 2k)
  • rf64 β€” RF64 (RIFF 64)

like, that's a menu. she ate. πŸ‘‘

πŸ’œ Options πŸ’œ

here's every option she recognizes, no skips:

  • -override-sample-rate=rate β€” forces the input to use a sample rate of rate Hz. yes ma'am, we're overriding it.
  • -endian=little β€” output file gets little endian data.
  • -endian=big β€” output file gets big endian data.
  • -endian=cpu β€” output file matches whatever the CPU's endianness is.
  • -normalize β€” normalizes the audio data in the output file. ✨

🌈 Encodings 🌈

that optional encoding parameter? yeah, it lets you set the data encoding for the output file. these are the encodings supported rn:

  • -pcms8 β€” signed 8 bit pcm
  • -pcmu8 β€” unsigned 8 bit pcm
  • -pcm16 β€” 16 bit pcm
  • -pcm24 β€” 24 bit pcm
  • -pcm32 β€” 32 bit pcm
  • -float32 β€” 32 bit floating point
  • -ulaw β€” ULAW
  • -alaw β€” ALAW
  • -ima-adpcm β€” IMA ADPCM (WAV only)
  • -ms-adpcm β€” MS ADPCM (WAV only)
  • -gsm610 β€” GSM6.10 (WAV only)
  • -dwvw12 β€” 12 bit DWVW (AIFF only)
  • -dwvw16 β€” 16 bit DWVW (AIFF only)
  • -dwvw24 β€” 24 bit DWVW (AIFF only)
  • -vorbis β€” Vorbis (OGG only)

if you don't specify an encoding for the output file, sndfile-convert will try to use the encoding of the input file. but bestie, lowkey that doesn't always work 😭 β€” because most container formats (like WAV, AIFF, etc.) only support a small subset of encodings (like 16 bit PCM, a-law, Vorbis, etc.). it's giving "we tried our best."


⭐ EXIT STATUS ⭐

sndfile-convert exits 0 on success, and >0 if an error occurs. simple as that, fr fr. πŸ’€


🫢 SEE ALSO 🫢

http://libsndfile.github.io/libsndfile/


πŸ‘‘ AUTHORS πŸ‘‘

Erik de Castro Lopo <erikd@mega-nerd.com>.


okay that's the whole page bestie, you're officially a sndfile-convert girlie now πŸ’… this was the Debian edition of the SNDFILE-CONVERT(1) manual, dated November 2, 2014 β€” slay, mwah, go convert something πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from