Transcoding is the process of converting media 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 are installed in:
Note that two transcoders can be chained together. Subsonic comes pre-installed with ffmpeg which supports a huge range of audio and video formats.
The recommended settings for audio and video transcoding are:
|mp3 audio||ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -|
The recommended downsample command is:
|ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -|
The recommended HTTP Live Streaming (HLS) command is:
|ffmpeg -ss %o -t %d -i %s -s %wx%h -v 0 -b:v %bk -maxrate %bk -bufsize 256k -flags -global_header -map 0:0 -map 0:%k -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 0 -copyts -|
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. "%t", "%a" and "%l" are substituted with the song's title, artist and album.
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 it must be able to read input from stdin.
- Is the transcoder installed in c:\subsonic\transcode (or /var/subsonic/transcode)?
- Is the transcoder activated for your player (in Settings > Players)?
- Is the proper file extension added to the list of recognized file types (in Settings > General)?
- If it still doesn't work, please check the Subsonic log.