Transcoding

Transcoding is the process of converting music from one 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), or /var/subsonic/transcode (other operating systems).

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:

  • 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 custom 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.

Sample configuration

This is the default transcoding configuration for the Windows transcoding pack. 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.

Convert from Convert to Step 1 Step 2
wav mp3 lame -b %b -S %s -
ogg mp3 oggdec %s -o lame -b %b - -
wma mp3 wmadec %s lame -b %b -x - -
flac mp3 flac -c -s -d %s lame -b %b - -
ape mp3 mac %s - -d lame -b %b - -
m4a mp3 faad -w %s lame -b %b -x - -
aac mp3 faad -w %s lame -b %b -x - -
mpc mp3 mppdec --wav --silent %s - lame -b %b - -
ofr mp3 ofr --decode --silent %s --output - lame -b %b - -
wv mp3 wvunpack -q %s - lame -b %b - -
shn mp3 shorten -x %s - lame -b %b - -

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.