MinimStreamer

Home

Installing

Release notes

User guide

Support

Forum

MinimServer

License

Contact

Donate

Latest news

Support for transcoding input type filters

Latest change

MinimStreamer 0.6.1 has been released

User guide

Table of contents

Starting MinimStreamer
Routing network streams via MinimStreamer
Transcoding
Input type filters [NEW]
Stream converter program
Making recordings
Sharing live network streams
Streaming options

Starting MinimStreamer

If you haven't already installed the MinimServer and MinimWatch download packages, see the Installing MinimServer and MinimWatch page for details of how to do this.

The next step is to install MinimStreamer as an add-on extension package for MinimServer. See the Installing MinimStreamer page for instructions.

If you have installed MinimStreamer succesfully, MinimStreamer will be started automatically when you start MinimServer. You can check that MinimStreamer is running by looking at the System tab of the MinimServer properties dialog. If MinimStreamer is running, the properties stream.converter, stream.record and stream.transcode will appear in the System tab.

Routing network streams via MinimStreamer

MinimServer supports network streams as http:// entries in .m3u playlist files. By default, the music player makes a direct connection to the network stream, which means the network stream isn't available to MinimStreamer. To route a network stream via MinimStreamer so that the features provided by MinimStreamer can be used with the stream, the name of the stream must be specified in the .m3u playlist file using the special format

[id] name

where id is the stream ID and name is the stream name.

The stream ID can be any unique identifier of your choice. It's used to tell MinimServer to route the stream via MinimStreamer to the music player, and it's also used by MinimStreamer to identify the stream for recording operations.

As an example, to route the Linn Radio Classical stream via MinimStreamer, you could use a .m3u playlist with the following contents:

#EXTM3U
#EXTINF:-1,[Linn] Linn Radio Classical
http://radio.linnrecords.com/cast/tunein.php/linnclassical/playlist.pls

When you view this stream in your control point, you will see an entry named [Linn] Linn Radio Classical that will route the network stream to your music player via MinimStreamer.

[NEW] If you also want to be able to play the network stream directly to your music player without using MinimStreamer, you can specify a plus sign (+) before the stream ID. For example, if you specify the stream ID as [+Linn] instead of [Linn], this will display a second playlist entry named Linn Radio Classical that will route the network stream directly to your music player without using MinimStreamer.

Some control points and renderers are unable to play streams unless additional stream audio information is provided in the playlist entry. If you need to provide this audio information for your control point or renderer, you can use one of the following formats for the stream name:

[id;type] name
[id;type,samplerate] name
[id;type,samplerate,channels] name

where type is the stream type (mp3, aac, etc.), samplerate is the sample rate (default 44100 if omitted) and channels is the number of channels (default 2 if omitted).

Transcoding

To enable transcoding, you need to specify one or more transcoding combinations in the stream.transcode property. The format of each transcoding combination is the input type followed by a colon followed by the output type. The input type is the format of the file or network stream you are playing, and the output type is the audio format that MinimStreamer will send to your music player. For example, to transcode FLAC files to WAV output, you would use the transcoding setting flac:wav.

You can specify multiple transcoding settings separated by commas. For example, to transcode Apple Lossless (ALAC) files to 24-bit WAV output and also transcode ADTS network streams to MP3 output, you would use the transcoding settings alac:wav24, aac:mp3.

For many transcoding combinations (noted in the list below), a stream converter program is required. See the Stream converter program section below for more information.

The following input types are currently supported:

aac AAC (Advanced Audio Coding) files and streams in ADTS format. Valid for local files served by MinimServer (.aac) and for network streams. For local files, the output type must be L16, L24, wav, wav24 or wav16. For network streams, all output types except for dopwav can be used. A stream converter program is required.
alac Apple Lossless (ALAC) files. Valid for local files served by MinimServer (.mp4 and .m4a) only. The output type must be L16, L24, wav, wav24 or wav16. A stream converter program is required.
dff DSD audio files in DFF format. Valid for local files served by MinimServer (.dff) only. The output type must be dopwav. A stream converter program is not required.
dsf DSD audio files in DSF format. Valid for local files served by MinimServer (.dsf) only. The output type must be dopwav (except as stated in the following paragraph). A stream converter program is not required.

If version 2.3 or later of the ffmpeg stream converter program is installed (version 2.0.2 or later in Synology DSM), you can convert .dsf files to native PCM by specifying an output type of wav, wav16, wav24, L16 or L24. The default output sample rate is 352800 and the default output sample bit depth is 32. You can override these default values by specifying an explicit sample rate and/or sample bit depth in the output type.

flac   FLAC files. Valid for local files served by MinimServer (.flac) only. The output type must be L16, L24, wav, wav24 or wav16. By default, a stream converter program is not required. If you want MinimStreamer to perform transcoding using a stream converter program, you can specify this by adding a semicolon after the output type.
mp3 MPEG 1/2/3 files and streams. Valid for local files served by MinimServer (.mp3) and for network streams. The output type must be L16, L24, wav, wav24 or wav16. A stream converter program is required.
mp4 MPEG-formatted files containing AAC audio data. Valid for local files served by MinimServer (.mp4 and .m4a) only. The output type must be L16, L24, wav, wav24 or wav16. A stream converter program is required.
* Network streams of unspecified type. All output types except for dopwav can be used. A stream converter program is required. In addition to performing transcoding, this setting informs the UPnP control point and renderer about the transcoding output type for a network stream whose original type is unspecified (i.e., when the stream is an HTTP URL in a .m3u playlist and the playlist entry doesn't contain a stream type). This setting isn't used if the stream is played by an internet radio using the instructions on the MinimRadio page

The following output types are currently supported:

dopwav   WAV stream containing DoP (DSD over PCM) audio data (see this page). A stream converter program is not required.
L16 PCM audio encoded in 16-bit signed LPCM format. If the input type isn't flac, a stream converter program is required.
L24 PCM audio encoded in 24-bit signed LPCM format. If the input type isn't flac, a stream converter program is required.
mp3 PCM audio encoded in MP3 format. A stream converter program is required.
wav PCM audio encoded in WAV format, preserving the original sample bit depth. If the input type isn't flac or if the output type is followed by a semicolon, a stream converter program is required.

If the input type is dsf, the output sample bit depth is 32 by default. You can override this default value by specifying wav16 or wav24 for the output type.

wav16 PCM audio encoded in 16-bit WAV format. For lossless 24-bit input streams (FLAC and ALAC), the audio samples are truncated to 16 bits by removing the low-order bits from each sample, which doesn't fully preserve the original lossless audio data. For lossy input streams (AAC and MP3), a floating-point conversion is performed with 16-bit precision. If the input type isn't flac or if the output type is followed by a semicolon, a stream converter program is required.
wav24 PCM audio encoded in 24-bit WAV format. For lossless 16-bit input streams (FLAC and ALAC), the audio samples are extended to 24 bits by padding each sample with zeros. For lossy input streams (AAC and MP3), a floating-point conversion is performed with full 24-bit precision. If the input type isn't flac or if the output type is followed by a semicolon, a stream converter program is required.

The original sample rate is preserved unchanged by default. For example, using the wav setting to transcode a FLAC file with a bit depth and sample rate combination of 16/44100 will produce a WAV audio format of 16/44100. Using the wav24 setting to transcode this file will produce a WAV audio format of 24/44100.

For an output type of wav, wav16, wav24, L16 or L24, you can specify the output sample rate by adding the suffix
 ;samplerate
where ; is a semicolon and samplerate represents the desired output sample rate rounded to the nearest kHz. This value can be 44 (for 44100 Hz), 48 (for 48000 Hz), 88 (for 88200 Hz), 96 (for 96000 Hz), 176 (for 176400 Hz), 192 (for 192000 Hz), 352 (for 352800 Hz) or 384 (for 384000 Hz). For example, to transcode to wav24 with a sample rate of 176400 Hz, you can specify an output type of wav24;176. If an output sample rate is specified, a stream converter program is used to transcode the stream.

As a special case, you can append a semicolon to the output type and omit the sample rate. This sets the output sample rate to the same as the input sample rate and uses a stream converter program to transcode the stream.

For an output type of mp3, you can change the output bit rate by adding the suffix
 ;bitrate
where ; is a semicolon and bitrate represents the desired output bit rate in kbps. This value can be 48k (for 48 kbps), 64k (for 64 kbps), 96k (for 96 kbps), 128k (for 128000 kbps), 192k (for 192 kbps), 256k (for 256000 kbps) or 320k (for 320 kbps). For example, to transcode to mp3 with a bit rate of 320 kbps, you can specify an output type of mp3;320k.

You can optionally add a size limit for transcoded WAV streams. The size limit can be specified in kilobytes (KB), megabytes (MB) or gigabytes (GB). For example, to limit a 24-bit WAV stream to less than 1 GB, you can specify the output type as wav24-1GB. The maximum limit is 4 GB, and this is also the default limit if no limit is specified. MinimServer will use the size limit to set the stream length in the WAV headers and will stop streaming when the limit has been reached.

If you specify the special size limit 0KB (zero kilobytes), this means the WAV stream size is unlimited. For example, to use an unlimited size for a 16-bit WAV stream, you can specify the output type as wav16-0KB. If the stream size is unlimited, MinimServer will send a stream length of zero in the WAV headers.

The default size limit of 4 GB should be be compatible with all players that can handle WAV streams. Setting an unlimited size can be useful if you're using a player that can handle a WAV header with a length of zero (such as the Linn DS), but it causes problems with some other players (such as Windows Media Player and BubbleUPnP Renderer). If you experience problems when using an unlimited size, this setting isn't compatible with your player.

For any input type, you can specify a list of output types by separating the output types with / (slash) characters. For example, the transcoding combination flac:L16/wav24 specifies the output types L16 and wav24 for the input type flac. If you do this, the control point will choose one of these output types based on the capabilities of the renderer. If you want to include the original untranscoded stream as one of the choices for the control point, you can use the - (dash) character as one of the output types in the list.

Note: For a network stream whose original type is unspecified and is not transcoded using the '*' input type, the choice of output type is made by MinimStreamer (not the control point) when MinimStreamer opens the stream and discovers its type. By default, MinimStreamer chooses the first output type in the list. You can override this default choice by adding a ^ (caret) character after the output type that you want MinimStreamer to choose. For example, the transcoding combination aac:L16/wav24^ tells MinimStreamer to choose wav24 if it discovers that the network stream type is AAC.

For best sound quality, it is recommended that you use the output sample bit depth that matches the maximum capabilty of your music player. For example, if your music player is a Linn DS, the best match is wav24. Results may vary with different types of music player.

MinimStreamer performs the transcoding process entirely in memory for best performance, and it shouldn't cause performance issues on the server. Transcoding can put additional load on the network because it increases the amount of data streamed from the server to the music player. If you notice any dropouts when playing transcoded audio, this is likely to be a network issue rather than a problem with MinimStreamer or your audio player.

Input type filters [NEW]

Yo use this feature, you need to be running MinimServer 0.8.4 update 92 (or higher) and MinimStreamer 0.6 (or higher).

You can use input type filters to apply transcoding to specific sample rates, bit depths or bit rates for local files (not network streams). To do this, you need to add a filter expression after the input type. The filter expression is enclosed in parentheses and is in one of the following formats:
 (samplerate)
 (bitdepth;samplerate)
 (bitdepth)
 (bitrate)

For an input type of mp3, the filter is specified as (bitrate) where bitrate can be 48k (for 48 kbps), 64k (for 64 kbps), 96k (for 96 kbps), 128k (for 128000 kbps), 192k (for 192 kbps), 256k (for 256000 kbps) or 320k (for 320 kbps).

For an input type of aac, the filter is specified as (samplerate) where samplerate can be 44 (for 44100 Hz), 48 (for 48000 Hz), 88 (for 88200 Hz), 96 (for 96000 Hz), 176 (for 176400 Hz), 192 (for 192000 Hz), 352 (for 352800 Hz) or 384 (for 384000 Hz).

For an input type of dsf or dff, the filter is specified as (samplerate) where samplerate can be 64 (for DSD64) or 128 (for DSD128),

For an input type of alac, flac or mp4, the filter is specified as (samplerate) or (bitdepth) or (bitdepth;samplerate) where samplerate can be 44 (for 44100 Hz), 48 (for 48000 Hz), 88 (for 88200 Hz), 96 (for 96000 Hz), 176 (for 176400 Hz), 192 (for 192000 Hz), 352 (for 352800 Hz) or 384 (for 384000 Hz) and bitdepth can be 16 (for 16-bit samples), 24 (for 24-bit samples) or 32 (for 32-bit samples).

Here are some examples of input type filters:
 mp3(256k)
 aac(48)
 dsf(128)
 flac(96)
 alac(24;192)
 flac(16)

You can specify a range of values by preceding the filter expression with a less than sign (<) or a greater than sign (>). For example, you can use the input type filter flac(>16;48) to select all FLAC files with either a bit depth greater than 16 or a sample rate greater than 48000 Hz.

You can specify any number of filtered transcoding settings for an input type and you can also specify an unfiltered transcoding setting for the same input type. For example, the following combination is valid:
 flac:wav, flac(>24;192):wav, flac(16;44):wav24;96
The filtered transcoding settings are processed first and are checked for a match in the order that they appear in the stream.transcode property. If there is no match, the unfiltered transcoding setting (if any) for the input type is used.

Stream converter program

For many transcoding combinations, a stream converter program is required. You can use either the ffmpeg program or the avconv program as the stream converter program. The ffmpeg or avconv binary executable (ffmpeg.exe or avconv.exe on Windows) must be installed on the computer or NAS that is running MinimStreamer.

The stream converter program can be installed in one of the directories in the PATH environment variable. Some NAS devices (for example, Synology and QNAP) do this automatically as part of the NAS firmware. If MinimStreamer finds the stream converter program in this location, it sets the stream.converter property to ffmpeg or avconv.

Alternatively, you can download a static binary executable for the ffmpeg or avconv program and install it in the MinimServer opt/bin directory (see below). If MinimStreamer finds the stream converter program in this location, it sets the stream.converter property to opt/bin/ffmpeg or opt/bin/avconv.

Another option is to install a static binary executable for the ffmpeg or avconv program anywhere on the computer or NAS that is running MinimStreamer. In this case, you need to set the stream.converter property to the absolute path of the ffmpeg or avconv program.

By default, MinimStreamer looks for the ffmpeg or avconv program in the MinimServer opt/bin directory. If it isn't found in this location, MinimStreamer searches the directories in the PATH environment variable. To disable this search, you can set the stream.converter property to the special value none to run MinimStreamer without a stream converter program.

The location of the MinimServer opt/bin directory depends on which platform you are using to run MinimServer, as follows:

Making recordings

You can record any network stream that is routed via MinimStreamer.

Note: Before recording a stream, check that the copyright license terms for the stream permit this.

To start a stream recording, click Properties from the minim icon menu and select the System tab of the properties dialog. Add the stream ID to the stream.record property and click OK. A message is displayed in the log window confirming that a recording for the stream has started. You can add either a single stream ID or multiple stream IDs separated by commas.

To start another stream recording while a recording is in progress, select the System tab of the properties dialog. Add the new stream ID to the stream IDs already present in the stream.record property and click OK. A message is displayed in the log window confirming that a new recording has started.

To stop a stream recording, select the System tab of the properties dialog. Remove the stream ID from the stream.record property and click OK. A message is displayed in the log window confirming that the recording has stopped.

To schedule a stream recording to start later, select the System tab of the properties dialog. In the stream.record property, add a scheduled recording task using the format

stream-id+start-time-end-time

Either or both of the start and end times can be specified. These times are specified in hhmm format using a 24-hour clock. For example, to start recording the stream mystream at 1930 (7.30 pm) and stop the recording at 2130 (9.30 pm), you would specify

mystream+1930-2130

To schedule a daily repeating recording, use the suffix * after the recording task start and end times. For example, to start recording the stream mystream at 1930 (7.30 pm) every day and stop the recording at 2130 (9.30 pm) every day, you would specify

mystream+1930-2130*

Recording files are saved in the rec subdirectory of the MinimServer log directory. You can change the location of this directory using the .logFile property on the System tab. Recording files are named with a combination of the stream ID and the start date and time of the recording.

You can start or stop recording a stream while you are listening to it, and you can start or stop listening to a stream while you are recording it. You can listen to a stream while you are recording another stream, subject to the available bandwidth of your network connection.

If a stream is being transcoded as well as recorded, the original format of the stream is written as the recording, not the transcoded format.

Streaming options

You can use the stream.options property to customize some streaming settings. These settings are separated by commas and each setting is of the form:
 name=value
or
 name={value}
where name is the option name and value is described below. The second form with curly braces is required if the value contains a comma.

The following options are available:

convOut A string containing additional output options to be passed to the stream converter program when performing transcoding. For example, if you want ffmpeg to use libsoxr for resampling and libsoxr is installed, you can specify:
convOut=-af aresample=resampler=soxr
delayHLS The number of seconds to delay an HLS internet stream relative to MinimStreamer's default setting. The value can be a positive integer or a negative integer. For example, to increase the stream delay by 20 seconds, you can specify:
delayHLS=20

Increasing this delay puts more data into the renderer's buffer and might help to reduce problems if your local network or internet connection is subject to heavy traffic or interruptions. Reducing this delay puts less data into the renderer's buffer and might cause dropouts if data from the network stream server is delayed for any reason.

streamSize  The maximum size of a network stream. This option is used to play network streams using control points or renderers that can't handle audio broadcast streams of unlimited size. The size can be specified in bytes, kilobytes (KB), megabytes (MB) or gigabytes (GB). For example, to use a maximum stream size of 1000 MB, you can specify a value of 1000MB (with no space before 'MB').
preBuffer The amount of audio data to be read into memory before starting to stream audio data to the renderer. Prebuffering is applied only when transcoding a FLAC file to WAV, L16 or L24 format or when transcoding a DSF or DFF file to DoP/WAV format. This option might be useful if the renderer doesn't play the stream smoothly when it first starts. The time taken to fill the buffer might cause a slight delay before audio starts playing.

The value is the number of seconds of audio data (5 seconds or less) to be prebuffered. It is specified as a decimal number with no more than 3 digits after the decimal point (millisecond precision). For example, you can specify '1', '2.5', '0.25' or '.125' but not '.1234'.