Madsonic Transcoding

Transcoding

Transcoding is the process of converting media from one format to another. Madsonic'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:

Windows  c:\madsonic\transcode
Linux  /var/madsonic/transcode
Mac  /Library/Application Support/Madsonic/transcode

Note that two transcoders can be chained together. Madsonic comes pre-installed with ffmpeg which supports a huge range of audio and video formats.

Recommended configuration for version 6.0, 6.1, 6.2

The recommended settings for audio transcoding is:

mp3 audio  ffmpeg -i %s -map 0:0 -b:a %mbk -v 0 -f mp3 -

The recommended settings for video transcoding is:

flv video  ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -c:v libx264 -preset superfast -threads 0 -
mkv video  ffmpeg -ss %o -i %s -c:v libx264 -preset superfast -b:v %bk -c:a libvorbis -f matroska -threads 0 -

The recommended downsample command is:

ffmpeg -i %s -map 0:0 -b:a %bk -ar 44100 -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:v: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.


Recommended configuration for version 6.3

The recommended settings for audio transcoding is:

mp3 audio  ffmpeg -i %s -map 0:a:0 -b:a %mbk -v 0 -f mp3 -

The recommended downsample command is:

ffmpeg -i %s -map 0:a:0 -b:a %mbk -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 %mbk -bufsize 256k -flags -global_header -map 0:v:0 -map 0:%k -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 4 -copyts -

Note that %s is substituted with the path of the original file at run-time, and %mb 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:

Substituted commands

Troubleshooting