Transcoding

Transcoding is the process of converting from one media format to another. Subsonic's transcoding engine allows for streaming of media that would normally not be streamable, for instance lossless formats. The transcoding is performed on-the-fly and doesn't require any disk usage.

The actual transcoding is done by third-party command line programs which must be installed in c:\subsonic\transcode (on Windows), /var/subsonic/transcode (other operating systems), or in a directory present in the PATH environment variable.

Up to three transcoders can be chained together. For instance, to convert FLAC to MP3 you would typically use a FLAC decoder which converts to WAV, and chain it with a WAV to MP3 encoder.

Transcoding pack for Windows

A transcoding pack for Windows with a selection of codecs can be downloaded here. It supports the following media types:

  • MP3
  • Ogg Vorbis
  • FLAC (Free Lossless Audio Codec)
  • AAC/MP4
  • WMA
  • WAV
  • APE (Monkey's Audio)
  • MPC (Musepack)
  • WavPack
  • SHN (Shorten)
  • OptimFROG Lossless and DualStream

Adding new transcoders

You can add your own custom transcoder given that it fulfills the following requirements:
  • It must have a command line interface.
  • It must be able to send output to stdout.
  • If used in transcoding step 2 or 3, it must be able to read input from stdin.

Example configuration

NameConvert fromConvert toStep 1Step 2
wav > mp3 wav mp3lame -b %b -S %s -
ogg > mp3 ogg mp3oggdec %s -olame -b %b - -
wma > mp3 wma mp3wmadec %slame -b %b -x - -
flac > mp3flacmp3flac -c -s -d %slame -b %b - -
ape > mp3 ape mp3mac %s - -dlame -b %b - -
m4a > mp3 m4a mp3faad -w %slame -b %b -x - -
mpc > mp3 mpc mp3mppdec --wav --silent %s -lame -b %b - -
ofr > mp3 ofr mp3ofr --decode --silent %s --output -lame -b %b - -
wv > mp3 wv mp3wvunpack -q %s -lame -b %b - -
shn > mp3 shn mp3shorten -x %s -lame -b %b - -
Note that "%s" is substituted with the path of the original file at run-time, and "%b" is substituted with the max bitrate of the player.

Troubleshooting

  • Is the transcoder installed in c:\subsonic\transcode (or /var/subsonic/transcode)?
  • Is the transcoder's enabled checkbox turned on (in Settings > Transcoders)?
  • Is the transcoder activated for your player (in Settings > Players)?
  • Is the proper file extension added to the music mask (in Settings > General)?
  • If it still doesn't work, please check the Subsonic log.