Afraid the music will stop right after the last track you selected have been streamed ? The automatic play feature in your personal settings will help. Read more.

Advertisement

What's the "Special extensions" (m4a/mp4) about ?

Background.
I've been asked a lot about integrating M4A-music files into AmpJuke. It is possible to 'stream' both m4a and mp4 in AmpJuke on a basic level (see below).

M4A's are different in some ways compared to more 'ordinary' formats like MP3, WMA etc.

First and foremost, reading tags from M4A-files is causing a little trouble in GetID3() (which AmpJuke relies heavily on).
Second, m4a is - more or less - a proprietary format.
Finally, m4a's are not very well suited for streaming. At least not the (simple) way AmpJuke streams music.

With all this in mind, I've taken some steps in order to integrate m4a-music, so m4a's can be "streamed" (played, rather) in AmpJuke.
This is done in a way that's referred to as 'Special extensions' on the AmpJuke configuration page (either accessed during setup and/or later on by logging in as an administrator and click "Configuration..." in the menu).

Special extensions was introduced with the m4a-format in mind, and operates - as the name says - on the extension of the file(s) considered to be 'special'.
 



Configuration.
Special extensions consists of four related parameters, as follows:
Enable handling of special extensions: When checked (enabled), AmpJuke will try to deal with music that has a "special extension" (like .m4a, .mp4 etc.).
If you clear this setting, the rest of the settings in this section will be ignored.

Special extensions is a list of extensions that - if found on an individual music track - will make a music track "special" (and handled as such). Each extension is seperated by a comma.
If you f.ex. enter: .m4a,.mp4,.wma (the default), it means that whenever AmpJuke comes across a track with an extension of .m4a,.mp4 or .wma, it will be handled different compared to other tracks.
In other words: "track1.m4a" will be handled different than "track1.mp3" (see "Important notes" below).

Update "now playing". If enabled (checked) a 'dummy-entry' will be written to the playlist to tell AmpJuke to update what's currently playing.
Note that enabling this might cause trouble in your media-player, since AmpJuke will write an entry to the playlist which cannot be played...
It's just there to ensure an update of "Now playing".

Update statistics. If enabled (checked) a 'dummy-entry' will be written to the playlist in a similar way as explained above. This time, the 'dummy-entry' will tell AmpJuke to update the statistics for the track.
Note that enabling this might cause trouble in your media-player, since AmpJuke will write an entry to the playlist which cannot be played...
 



Important notes.
- Your media player might refuse to play certain types of digital music (f.ex. m4a or mp4's).
This is a well-known fact for XMMS and Windows Media Player (at least without an appropriate codec).
Further, a combination of XMMS and .wma won't work.
So the choice of media-player vs. "type of music-file" might prevent you from listening...

- Files with 'special' extensions will not be streamed, - just transferred
. They are copied to AmpJuke's 'tmp' folder, then pumped out as a regular http-request (which explains the settings for "Update now playing" and "Update statistics" above).
After 24 hours, the copy in the 'tmp' folder is cleared/deleted.
However, the most important fact in relation to this is that music played this way in AmpJuke will have a copy outside the "doc_root".

It's impossible to transcode m4a's to a different bitrate using LAME.
The m4a-files (and other files with a 'special extension') will be played in AmpJuke using their "natural" bitrate no matter what.

10-09-2010