Language

English
How to Audio/Video Streaming and File Sharing with Ampache Print E-mail
Written by myOltrans    Sunday, 26 July 2009 11:41    Last Updated on Monday, 03 August 2009 19:54

Ampache is a web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.

Ampache is in the archive of Ubuntu 9.04. To install Ampache:

sudo apt-get install ampache

Follow the steps. If you have already installed a Mysql database or any other, set up the Ampache to use it.

Some errors

If you run on the following error:

Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

To correct this remove the folder /var/lib/mysql and install mysql:

sudo mv /var/lib/mysql /var/lib/mysql.old
sudo apt-get install mysql-server-5.1

If after installation there is this error:

/var/lib/dpkg/info/mysql-server-5.0.postinst: line 144: /etc/mysql/conf.d/old_passwords.cnf: No such file or directory

Use this code to correct it:

mkdir /etc/mysql/conf.d
chown -R mysql:mysql /var/lib/mysql/*
dpkg --configure -a

Both solutions were taken from the thread problem with installing myqsl-server.

Cyrillic Characters

If you wish to insert id3tags (encoded in Cyrillic CP1251 or in Japanese Shift_JIS) into database, change the following code in the file /usr/share/ampache/www/modules/getid3/getid3.php

 

        public $encoding                 = 'ISO-8859-1';      // CASE SENSITIVE! - i.e. (must be supported by iconv() - see http://www.gnu.org/software/libiconv/).  Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE.
        public $encoding_id3v1           = 'ISO-8859-1';      // Override SPECIFICATION encoding for broken ID3v1 tags caused by bad tag programs. Examples: 'EUC-CN' for "Chinese MP3s" and 'CP1251' for "Cyrillic".
        public $encoding_id3v2           = 'ISO-8859-1';      // Override ISO-8859-1 encoding for broken ID3v2 tags caused by BRAINDEAD tag programs that writes system codepage as 'ISO-8859-1' instead of UTF-8.

to

        public $encoding                 = 'UTF-8';      // CASE SENSITIVE! - i.e. (must be supported by iconv() - see http://www.gnu.org/software/libiconv/).  Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE.
        public $encoding_id3v1           = 'CP1251';      // Override SPECIFICATION encoding for broken ID3v1 tags caused by bad tag programs. Examples: 'EUC-CN' for "Chinese MP3s" and 'CP1251' for "Cyrillic".
        public $encoding_id3v2           = 'CP1251';      // Override ISO-8859-1 encoding for broken ID3v2 tags caused by BRAINDEAD tag programs that writes system codepage as 'ISO-8859-1' instead of UTF-8.

Save the file and reload the catalogue.

Using Rhythmbox

Open Ampache in your web browser.

Go to the admin tab, and choose Add Catalog. Fill in the form and submit. This can take some time for large file systems.

In the admin tab, choose Add Users and add as many users as you need.

Still in the admin tab, choose add acl and add in some access control lists. Make the first one

  • Name Stream Access
  • Start Address 0.0.0.0
  • End Address 255.255.255.255
  • Level Read
  • User Ampache User (system)
  • Key Leave Blank
  • Type Stream Access

make another one

  • Name Interface Access
  • Start Address 0.0.0.0
  • End Address 255.255.255.255
  • Level View
  • User Ampache User (system)
  • Key Leave Blank
  • Type Web Interface

In your terminal

sudo gedit /var/www/music/config/ampache.cfg.php

and find the section that looks like this

; Use Access List
; Toggle this on if you want ampache to pay attention to the access list
; and only allow streaming/downloading/xml-rpc from known hosts xml-rpc
; will not work without this on.
; NOTE: Default Behavior is DENY FROM ALL
; DEFAULT: false
;access_control = "false"

and change it to look like this

; Use Access List
; Toggle this on if you want ampache to pay attention to the access list
; and only allow streaming/downloading/xml-rpc from known hosts xml-rpc
; will not work without this on.
; NOTE: Default Behavior is DENY FROM ALL
; DEFAULT: false
access_control = "true"

Save the file and exit gedit.

Repeat this next section on every client computer:

  • Get the Rhythmbox plugin. Regretfully the plugin is no more available on the provided address.
  • Unpack the plugin into the client computer's /home/YOUR_USER_NAME/.gnome2/rhythmbox/plugins folder and fire up Rhythmbox.
  • In Rhythmbox go to Edit==>Plugins and click on the new Ampache plugin, and click configure.
  • If the lan ip of the server is 192.168.1.3, and it should be static, then set the url to http://192.168.1.3/music/server/xml.server.php For good measure you can enter in the password for the user, but leave the name blank.
  • Save your settings and wait for the library to load, this may take some time for large collections. Also, these setting work for me, if you have problems, check out the forum link I posted.

These instructions are taken from Awesome Music server = Your existing Ubuntu 8.10 Desktop + Ampache + Rhythmbox, Oh My!.

Other links


blog comments powered by Disqus
 

© Copyright 2008-2015 Oltrans. Translation Agency Recourse Portal.
All rights reserved. Various trademarks held by their respective owners.

Oltrans, 152, 6-ti septemvri Bul., Plovdiv 4000 Bulgaria
General Inquiries: (Bulgaria) +359 32 511 272 | skype: Oltrans.org My status