ストリーミングメディアサーバ−を導入

PCからWEBブラウザ経由でFlashによる音楽ストリーミング。
また、Android端末では専用ソフトをダウンロードすることで音楽が聴ける。

Subsonic
http://www.subsonic.org/pages/installation.jsp

Java製ストリーミングメディアサーバ−
ウェブベースのフロントエンドとして機能

Fedora/CentOS

1.Javaのインストール。SunJavaでもいける?

sudo yum install java-1.6.0-openjdk

2.Subsonicダウンロード

wget http://downloads.sourceforge.net/project/subsonic/subsonic/4.1/subsonic-4.1.rpm?r=http%3A%2F%2Fwww.subsonic.org%2Fpages%2Fdownload2.jsp%3Ftarget%3Dsubsonic-4.1.rpm&ts=1284742647&use_mirror=jaist

3.インストール
インストールが終わった時点でサービスが起動している

sudo yum install --nogpgcheck subsonic-4.1-1806.rpm

4.トランスコード機能のためにエンコーダを導入
※以下の手順を実行するには、RPM Fusionをリポジトリに登録する必要がある。

sudo yum install lame flac faad2 vorbis-tools ffmpeg

5.とりあえず再起動

sudo service subsonic restart 

6.音楽フォルダの作成

sudo mkdir /home/music
sudo chmod 777 /home/music/

7.音楽ファイルをつっこむ。
ディレクトリ構成は、アーティスト名>アルバム名という構成にする。
#多分だけど、MP3タグの文字コードUTF-8にしてないと文字化けするかも。(未検証)
#当方はすべてUTF-8でMP3タグ作ってるから日本語も表示された。
○アルバムの中に画像つっこむと、アルバム画像として表示される?

JVMのメモリ割り当てを変更する場合

/usr/share/subsonic/subsonic.shをいじくればOK?
デフォルトは、100Mの模様。

■ポートを変更する場合

デフォルトは4040の模様。

sudo vi /etc/sysconfig/subsonic 
SUBSONIC_ARGS="--port=7070 --max-memory=80"
■起動・停止

サービスに入ってる
sudo service subsonic start / stop / restart

■WEBでアクセス

http://localhost:4040.
admin/adminでログイン

日本語表示に変更

Settings>Generalから、Default languageを日本語に変更
Saveボタンをクリック。
その後、リロードもしくはログアウト。

管理者パスワード変更

設定>ユーザから、ユーザ「admin」を選択し、
パスワード変更にチェック。

ユーザの追加

アクセスユーザを追加する

音楽フォルダの設定

設定>音楽フォルダから、音楽ディレクトリを指定する。

■Hack

Wikipediaのリンク
すんばらしいプログラムなんですが、プレイリストの画面で、自分がほしいと思ったWikipediaのリンクが
英語のWikiに飛んでいくのがとても残念。なのでちょこっとHack。
ソースをまさぐりました。
/usr/share/subsonic/subsonic.war内にある、WEB-INF/jsp/main.jspを修正。
en.wiki箇所をja.wikiに変更しただけ。

・Googelのリンク
Music Search Featureってサービス。USオンリーだって。そのまま放置。
・アマゾンAD
外そうと思ってたら、個人設定でテーマ変更すると消えたので放置。


■参照

ドキュメント
http://subsonic.org/pages/documentation.jsp

Ubuntu

まだ導入してない。そのまま引用

This installation option applies to Debian Linux, including Ubuntu.

First, install Java: sudo apt-get install openjdk-6-jre
Download the Subsonic .deb package and install it: sudo dpkg -i subsonic-x.x.deb
Notice that the installer configures your system to start Subsonic automatically when booting. After installing, open the Subsonic web page on http://localhost:4040.

Transcoders

To make use of Subsonic's powerful transcoding feature, it's highly recommended to install some third-party transcoders: sudo apt-get install lame flac faad vorbis-tools ffmpeg

Advanced configuration

To change the port number, Java memory settings or other startup parameters, edit the SUBSONIC_ARGS variable in /etc/default/subsonic. To restart Subsonic, do sudo service subsonic restart

Troubleshooting

Check the logs in /var/subsonic.