1 Ampache Player

The background to this project is that I didn’t like the html interface for the Ampache player, I wanted it to work more like an desktop application.

The Player is written in Flex, Actionscript 3 and PHP and uses AMF to communicate between server and client. The AMFPHP service is used to make querys to a Ampache database and the filesystem.

version 0.6

There is a playable demo here. All the mp3:s in the demo is fetched from hype machine. send me a mail if you want me to delete any of them. If you tried the demo before it might be some issues with the cache, go to settings and press update catalog and it should be fixed. By the way, my server is really slow sometimes.

(source and binaries)

(the dots in the names are deleted by wordpress)

- if you don’t have Ampache installed, install it and make sure it works.
- if you don’t have AMFPHP installed, install it and make sure it works.
- copy the ampache folder to the installed servicefolder in amfphp
- check the variables in settings.php in the ampache service folder.
- if the installation folder struture is not the same as zip. check the require in assets.php to point to the amfphp service
- browse to ampache_player.html and hope for the best.

- Make you own stylesheet with the Flex2StyleExplorer and replace style.css.
- Write your own spectrum visualisation and upload to the visualisations folder, its easier then you think. Then you can select it in the settings tab.

- flashplayer >= 9

- amfphp installation (tested on amfphp-1.9.beta.200705139)
- ampache installation (tested on ampache-

- flex 2 SDK (tested on flex 2.01)

AMF has some limitations in the message size and should not exceed 40Kb which is less then 2000 songs. To be able to load the complete catalog the querys is splited into 1000 song at the time. The consequence is that a 50k songs catalog makes 50 requests to the server the first time the songs are loaded. The server might not like that since it can be pretty CPU heavy.

The speed of the filter as you type in the filter input field is proportional to the number of songs. A tests with 100k songs takes about 400ms for every character with my 2GHz single core laptop.

Local Shared Objects has a default limit to 100Kb, since the complete catalog is going to be stored the settings dialog pops up and the user has to accept a larger LSO. 100k songs becomes about 3mb of LSO.

There is a bug in the Datagrid if the same object is represented more then one time in the same grid.

Version history
0.1 (no public release)
+ browse the songs and dragdrop to playlist.
+ play songs

+ visualisation
+ stylesheet
+ move things to trash from the playlist

+ security fixes
+ enabled login
+ rewritten to Cairngorm
+ local shared objects to store settings and catalogs.
+ some player button fixes
+ settings tab
+ double click to move and play


+ split download of catalog to 1000 songs at the time.
+ filtering of songs
+ random play
- hard coded urls.

+ playlist support, it should be compatile with the ampache playlist.
- dropped the need for ampache. The only thing used now is the database and mp3s.

+ upload support. limited by the max post size in php.ini. Do not fetch covers arts.
+ add some random files to playlist button
+ only download changes in the catalog.
+ automatic update from catalog.
+ folder drag improvements

+ tripleclick on song to add whole album.
+ playlist clear button.
+ some player bugfixes.

- automatic update of LSO when the ampache catalog is updated. [fixed in 0.6]
- only load changes in the catalog. [fixed in 0.6]
- enable all of the settings [took away some settings]
- better working covers
- folder drop improvements [fixed in 0.6]

There is also a tread about this at http://ampache.org/forums/viewtopic.php?pid=9273

One Comment to “Ampache Player”
  1. Birgit, on June 17th, 2015 at 03:48:28, said:

    Conditional Rule: Conditional rules are an AppNexus concept
    utilizedd in writer cost phrases and advert quality.

Comment on this post below

You can leave a response, or trackback from your own site.