Did you know AmpJuke can scan a subset
of your music collection ? Using the "last scanned" date makes scan+import run much faster. Read more
How do I configure transcoding (aka. downsampling) ?
What it is:
Transcoding (also referred to as "downsampling" - reducing the quality, typically the bitrate, to a lower number to preserve bandwidth) can be enabled, if upload bandwidth is limited and/or you have many users hitting your box.
Downsampling is done in real-time and does not affect your music tracks, - since the downsampled music is streamed to the user right away.
However, the "price" for all this comes in the form of a higher load on the CPU, so you might need to take a hard look at your CPU and available memory...
Besides AmpJuke, you'll also need the popular Lame program to be installed on your box.
Most Linux-distributions offers Lame right out of their software package management.
How it works:
By enabling downsampling in AmpJuke it is possible to stream online music at a lower bitrate, compared to the (possibly higher) bitrate the track is encoded in.
For example, is it possible to stream a given track at 64kbps rather than 256kbps (if that's the bitrate the track is encoded with).
So by saving upload bandwidth, you can have more users streaming music simultaneously, or - if a user is located at a place with limited download bandwidth - downsampling can help improving the listening experience.
...at the cost of "downgraded music" (downsampling has an effect on the quality of the streamed music).
How it's configured:
Just like most other settings in AmpJuke, this operates on several "levels".
You (or some other user with admin. rights) can either enable/disable transcoding during installation, and/or later by logging in and click "Configuration..." in the low left corner on the "welcome" page.
The parameters in relation to transcoding are as follows:
Enable transcoding/downsampling: If checked, transcoding/downsampling is enabled.
It will automatically happen for all existing and new users by default.
You can override downsampling for one or more users (f.ex. yourself...), please see "Important notes" below.
If you choose not to enable this setting, the rest of the parameters associated with transcoding/downsampling will not have any effect.
Absolute path...: As mentioned, Lame is required to be installed.
Normally it's located in "/usr/bin" and, if that is the case, the absolute path would look like this: /usr/bin/lame.
Check where Lame is on your own box executing "whereis lame" in a terminal.
Default parameters: The default parameters used by Lame should be entered here.
To transcode music to a bitrate of 128kbit/sec with a decent quality, enter: --silent --nohist -b 128 -q 7
You can override the default setting for individual users (see "Important notes" below).
Please note there are many options associated with Lame's parameters. For more information, you might want to take a look at Hydrogen Audio's wiki.
The most important parameter to remember is -b xxx (f.ex. -b 64). AmpJuke actually relies on that parameter to be present in order to do an error-free downsampling.
Enable downsampling based on IP-addresses can be enabled if you want to transcode music based on IP-addresses/ranges.
For example, I like to listen to music while at work but prefer to listen using a fixed bitrate of 64kbps for obvious reasons (i.e. not burdening the company's internet-connection plus the fact that I'm only using a couple of sh*tty PC-speakers). So by enabling this setting, and punching in my company's IP-address range in the associated field "for these IP-addresses/-ranges", I can listen to downsampled music while at work but get the full bitrate pumped out while at home...
...all based on the same username...
If you enable the previous setting the field "for these IP-addresses/-ranges" must contain information about IP-addresses (individual addresses and/or ranges) that will stream music using a lower bitrate.
Each entry is seperated by a comma, and wildcards (*) can be used.
For example, entering "85.192.*.*, 184.108.40.206" in the field means that everybody coming from an IP-address starting with 85.192 as well as anyone coming from the specific IP-adddress 220.127.116.11 will listen to downsampled music.
Important notes about transcoding:
1. As mentioned, enabling transcoding/downsampling means that all users will stream transcoded music by default.
However, this can be switched completely off, or alterered (see 2 below), for individual users.
You - or another administrator - will have to edit each user account and un-check the "Transcode" setting, if one or several users should be lucky enough to avoid listening to the transcoded/downsampled music.
2. It's possible to override the default parameters (specified above) for individual user accounts.
You do that by editing the user account in question, then enter some parameters that will be used instead of the default parameters.
If you want to allow a specific user to have specific downsampling parameters, you can enter some local parameters for that user.
It's supposed to be entered in the text-field right after the "Transcode" setting, and then those settings will apply to that user only.
3. Not all music formats are suitable for transcoding and not all media-players "validates" transcoded music streams correctly.
This obviously depends on what type of music you have, what parameters you're using as well as what media-players are being used to listen to music.
4. Transcoding might produce unwanted "clicks" (i.e. high-frequency sounds) or some other unexpected behavior.
This might be related to very high CPU-load, limited bandwidth and/or "strange" music-formats (see 3 above).