设置Linux PlayStation 3媒体服务器(CentOS 5.2)

设置Linux PlayStation 3媒体服务器(CentOS 5.2)

版本1.0
作者:Andrew Colin Kissa <andrew [at] topdog [dot] za [dot] net>

介绍

索尼PlayStation 3是DLNA兼容设备, DLNA是家庭电子可以无缝共享数字媒体和内容的框架。 本教程是对Ubuntu以前的howto的跟进。 鉴于我喜欢大多数其他人使用CentOS作为其服务器分发的首选,我觉得适合运行我的DLNA服务器。 虽然存在其他几个开源媒体服务器,但由于易于使用,因此我选择使用Fuppes,并支持转码。

通过以下方式,您将能够创建一个服务器,您可以通过支持DLNA的设备(如Sony PS3,Nokia N95等)播放存储在服务器上的数字媒体。

要求

  • Sony PlayStation 3或其他具备DLNA功能的设备
  • 运行CentOS 5.2的计算机,具有网络连接
  • 无线局域网(可选)
  • 工作互联网连接(下载包)
  • 要流媒体

安装

下载并安装我打包的Fuppes Centos rpm ,rpm使用我的PGP密钥进行签名,并且取决于rpmforge存储库提供的包。 您将需要安装我的PGP密钥以及rpmforge yum存储库包。

wget http://www.topdog-software.com/oss/roundcube/andrew_topdog-software.com_key.txt
rpm --import andrew_topdog-software.com_key.txt
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
wget http://www.topdog-software.com/oss/fuppes/fuppes-0.7.2-627SVN.i386.rpm
yum localinstall fuppes-0.7.2-627SVN.i386.rpm

组态

  • 编辑fuppes配置文件/etc/fuppes/fuppes.cfg和接口选项,在我的例子中,我将使用IP地址192.168.1.2
    <interface>192.168.1.2</interface>
    
  • 启动fuppes,然后将浏览器指向http://192.168.1.2:56596
    /etc/init.d/fuppes start
  • 选择左侧菜单上的配置
  • 在“ContentDirectory设置” - >“添加对象”下,键入要共享媒体的目录的名称(您还可以共享一个iTunes数据),然后单击“提交查询”
  • 添加尽可能多的目录,我添加了以下内容:
    /srv/fuppes/Videos
    /srv/fuppes/Music
    /srv/fuppes/Pictures
  • 重建媒体数据库
  • 选择左侧菜单上的选项
  • 点击“重建数据库”
  • 监视状态页面上的重建状态,您会看到计数器随着您的媒体被索引而增加。
  • 在您的计算机上配置要由客户端找到的媒体服务器的组播路由,创建一个/ etc / sysconfig / network-scripts / route-ethX文件 ,其中包含以下内容(将X替换为您在计算机上使用的接口)
    239.0.0.0/8 dev ethX
    
  • 重启网络
    service network restart

测试

索尼PlayStation 3

连接到您的PS3,然后转到视频,然后选择搜索媒体服务器,如果一切顺利,您应该找到您的媒体服务器命名为fuppes,选择并转到一个文件夹与视频选择和播放。 对您的音乐和图片重复此过程。

诺基亚N95

转到工具 - >连接 - >家庭媒体 - >浏览媒体。 您N​​95将连接到WLAN并开始搜索,并应找到您的fuppes媒体服务器,选择它,你会看到你的文件夹,从那里你可以播放你的媒体,并将其复制到您的设备。

Xbox

Fuppes还支持Xbox,使用M $产品? 你只能靠自己。

示例配置文件

  • /etc/fuppes/fuppes.cfg
    <?xml version="1.0" encoding="UTF-8"?>
    <fuppes_config version="0.7.2.3">
      <shared_objects>
      <dir>/srv/fuppes/Music</dir>
      <dir>/srv/fuppes/Videos</dir>
      <dir>/srv/fuppes/Pictures</dir>
      </shared_objects>
      <network>
        <!--empty = automatic detection-->
        <interface>192.168.1.2</interface>
        <!--empty or 0 = random port-->
        <http_port>56596</http_port>
        <!--list of ip addresses allowed to access fuppes. if empty all ips are allowed-->
        <allowed_ips>
          <!--<ip>192.168.0.1</ip>-->
        </allowed_ips>
      </network>
      <content_directory>
        <!--a list of possible charsets can be found under:
          http://www.gnu.org/software/libiconv/-->
        <local_charset>UTF-8</local_charset>
        <!--libs used for metadata extraction when building the database. [true|false]-->
        <use_imagemagick>true</use_imagemagick>
        <use_taglib>true</use_taglib>
        <use_libavformat>true</use_libavformat>
      </content_directory>
      <transcoding>
        <!--[lame|twolame]-->
        <audio_encoder>lame</audio_encoder>
        <!--[true|false]-->
        <transcode_vorbis>true</transcode_vorbis>
        <transcode_musepack>true</transcode_musepack>
        <transcode_flac>true</transcode_flac>
      </transcoding>
      <device_settings>
        <!--"default" settings are inhertied by specific devices and can be overwritten-->
        <device name="default">
          <!--specify the maximum length for file names (0 or empty = unlimited)-->
          <max_file_name_length>0</max_file_name_length>
          <!--[file|container]-->
          <playlist_style>file</playlist_style>
          <show_childcount_in_title>false</show_childcount_in_title>
          <enable_dlna>true</enable_dlna>
          <transcoding_release_delay>4</transcoding_release_delay>
          <file_settings>
            <!--audio files-->
            <file ext="mp3">
              <type>AUDIO_ITEM</type>
              <mime_type>audio/mpeg</mime_type>
              <dlna>MP3</dlna>
            </file>
            <file ext="ogg">
              <type>AUDIO_ITEM</type>
              <mime_type>application/octet-stream</mime_type>
              <transcode enabled="true">
                <ext>mp3</ext>
                <mime_type>audio/mpeg</mime_type>
                <dlna>MP3</dlna>
                <http_encoding>chunked</http_encoding>
                <decoder>vorbis</decoder>
                <encoder>lame</encoder>
                <bitrate>192</bitrate>
                <samplerate>44100</samplerate>
              </transcode>
            </file>
            <file ext="mpc">
              <type>AUDIO_ITEM</type>
              <mime_type>application/octet-stream</mime_type>
              <transcode enabled="true">
                <ext>mp3</ext>
                <mime_type>audio/mpeg</mime_type>
                <dlna>MP3</dlna>
                <http_encoding>chunked</http_encoding>
                <decoder>musepack</decoder>
                <encoder>lame</encoder>
                <bitrate>192</bitrate>
                <samplerate>44100</samplerate>
              </transcode>
            </file>
            <file ext="wav">
              <type>AUDIO_ITEM</type>
              <mime_type>audio/x-wav</mime_type>
            </file>
            <file ext="flac">
              <type>AUDIO_ITEM</type>
              <mime_type>audio/x-flac</mime_type>
              <transcode enabled="true">
                <ext>mp3</ext>
                <mime_type>audio/mpeg</mime_type>
                <dlna>MP3</dlna>
                <http_encoding>chunked</http_encoding>
                <decoder>flac</decoder>
                <encoder>lame</encoder>
                <bitrate>192</bitrate>
                <samplerate>44100</samplerate>
              </transcode>
            </file>
            <file ext="wma">
              <type>AUDIO_ITEM</type>
              <mime_type>audio/x-ms-wma</mime_type>
              <dlna>WMAFULL</dlna>
            </file>
            <!--image files-->
            <file ext="jpg">
              <ext>jpeg</ext>
              <type>IMAGE_ITEM</type>
              <mime_type>image/jpeg</mime_type>
              <convert enabled="false">
                <!--<dcraw enabled="true">-q 0</dcraw>-->
                <ext>png</ext>
                <mime_type>image/png</mime_type>
                <height>0</height>
                <width>0</width>
                <!--set "greater" to "true" if you only want to resize images greater than "height" or "width"-->
                <greater>false</greater>
                <!--set "less" to "true" if you only want to resize images less than "height" or "width"-->
                <less>false</less>
                <!--set "less" and "greater" to "false" if you always want to resize-->
              </convert>
            </file>
            <file ext="bmp">
              <type>IMAGE_ITEM</type>
              <mime_type>image/bmp</mime_type>
            </file>
            <file ext="png">
              <type>IMAGE_ITEM</type>
              <mime_type>image/png</mime_type>
            </file>
            <file ext="gif">
              <type>IMAGE_ITEM</type>
              <mime_type>image/gif</mime_type>
            </file>
            <!--video files-->
            <file ext="mpg">
              <ext>mpeg</ext>
              <type>VIDEO_ITEM</type>
              <mime_type>video/mpeg</mime_type>
            </file>
            <file ext="mp4">
              <type>VIDEO_ITEM</type>
              <mime_type>video/mp4</mime_type>
            </file>
            <file ext="avi">
              <type>VIDEO_ITEM</type>
              <mime_type>video/avi</mime_type>
            </file>
            <file ext="wmv">
              <type>VIDEO_ITEM</type>
              <mime_type>video/x-ms-wmv</mime_type>
            </file>
            <file ext="vob">
              <type>VIDEO_ITEM</type>
              <mime_type>video/x-ms-vob</mime_type>
            </file>
            <file ext="vdr">
              <type>VIDEO_ITEM</type>
              <mime_type>video/x-extension-vdr</mime_type>
              <transcode enabled="true">
                <ext>vob</ext>
                <mime_type>video/x-ms-vob</mime_type>
              </transcode>
            </file>
            <file ext="flv">
              <type>VIDEO_ITEM</type>
              <mime_type>application/x-flash-video</mime_type>
            </file>
            <file ext="asf">
              <type>VIDEO_ITEM</type>
              <mime_type>video/x-ms-asf</mime_type>
            </file>
            <!--playlists-->
            <file ext="pls">
              <type>PLAYLIST</type>
              <mime_type>audio/x-scpls</mime_type>
            </file>
            <file ext="m3u">
              <type>PLAYLIST</type>
              <mime_type>audio/x-mpegurl</mime_type>
            </file>
          </file_settings>
        </device>
        <!--If you have more than one device it is a good idea to set the ip address manually as some devices may have conflicting "user agents".-->
        <device name="PS3" enabled="true">
          <user_agent>UPnP/1.0 DLNADOC/1.00</user_agent>
          <user_agent>PLAYSTATION3</user_agent>
          <!--<ip></ip>-->
          <enable_dlna>true</enable_dlna>
          <transcoding_release_delay>50</transcoding_release_delay>
          <file_settings>
            <file ext="ogg">
              <type>AUDIO_ITEM_MUSIC_TRACK</type>
              <transcode enabled="true">
                <http_encoding>stream</http_encoding>
              </transcode>
            </file>
          </file_settings>
        </device>
        <device name="Xbox 360" virtual="Xbox 360" enabled="false"><description_values> 
          <friendly_name>%s %v : 1 : Windows Media Connect</friendly_name> 
          <model_name>Windows Media Connect compatible (%s)</model_name> 
          <model_number>2.0</model_number> 
    	  </description_values> 
          <user_agent>Xbox/2.0.\d+.\d+ UPnP/1.0 Xbox/2.0.\d+.\d+</user_agent>
          <user_agent>Xenon</user_agent>
          <xbox360>true</xbox360>
        </device>
        <device name="Noxon audio" virtual="default" enabled="false">
          <!--Please enter the address of your Noxon. Automatic detection is impossible because the Noxon does not send a "user-agent" in it's requests-->
          <!--<ip></ip>-->
          <playlist_style>container</playlist_style>
          <show_childcount_in_title>true</show_childcount_in_title>
        </device>
        <device name="Telegent TG 100" virtual="default" enabled="false">
          <user_agent>dma/1.0 \(http://www.cybertan.com.tw/\)</user_agent>
          <user_agent>UPnP/1.0 DLNADOC/1.00</user_agent>
          <playlist_style>file</playlist_style>
          <max_file_name_length>101</max_file_name_length>
        </device>
      </device_settings>
    </fuppes_config>
    
  • /etc/fuppes/vfolder.cfg
    <?xml version="1.0" encoding="UTF-8"?>
    <fuppes_vfolder_config version="0.2">
     <vfolder_layout device="default" enabled="false">
        <vfolder name="Genre">
          <vfolders property="genre">
            <items type="audioItem" />
          </vfolders>
        </vfolder>
        <vfolder name="Genre/Artists">
          <vfolders property="genre">
            <vfolders property="artist">
              <items type="audioItem" />
            </vfolders>
          </vfolders>
        </vfolder>
        <vfolder name="Artists/Albums">
          <vfolders property="artist">
            <vfolders property="album">
              <items type="audioItem" />
            </vfolders>
          </vfolders>
        </vfolder> 
        
        <vfolder name="ABC/Artists/Albums">
          <vfolders split="ABC">
            <vfolders property="artist">
              <vfolders property="album">
                <items type="audioItem" />
              </vfolders>
            </vfolders>
          </vfolders>
        </vfolder>
           
        <vfolder name="Photos">
          <vfolder name="All">
            <items type="imageItem" />
          </vfolder>
          <vfolder name="Folders">
            <folders filter="contains(imageItem)" />
          </vfolder>      
        </vfolder>
        <vfolder name="Videos">
          <vfolder name="All">
            <items type="videoItem" />
          </vfolder>
          <vfolder name="Folders">
            <folders filter="contains(videoItem)" />
          </vfolder>
        </vfolder>
        
        <vfolder name="shared dirs">
          <shared_dirs full_extend="true" />
        </vfolder>
        
      </vfolder_layout>
      <vfolder_layout device="Xbox 360" enabled="true">
        <vfolder name="Music" id="1">
          <vfolder name="Album" id="7">
            <vfolders property="album" type="container.album.musicAlbum">
              <items type="audioItem" />
            </vfolders>
          </vfolder>
                
          <vfolder name="All Music" id="4">
            <items type="audioItem" />
          </vfolder>
          
          <vfolder name="Artist" id="6">
            <vfolders property="artist" type="container.person.musicArtist">
              <items type="audioItem" />
            </vfolders>
          </vfolder>
          
          <vfolder name="Folders" id="20">
            <folders filter="contains(audioItem)" />
          </vfolder>
          
          <vfolder name="Genre" id="5">
            <vfolders property="genre" type="container.genre.musicGenre">
              <items type="audioItem" />
            </vfolders>
          </vfolder>
          
          <vfolder name="Playlist" id="15" />
        </vfolder>
       
        <vfolder name="Pictures" id="3">
          <vfolder name="Album" id="13" />
          
          <vfolder name="All Pictures" id="11">
            <items type="imageItem" />
          </vfolder>
          
          <vfolder name="Date Taken" id="12" />
          
          <vfolder name="Folders" id="22">
            <folders filter="contains(imageItem)" />
          </vfolder>
        </vfolder>
        <vfolder name="Playlists" id="18">
          <vfolder name="All Playlists" id="19" />
          <vfolder name="Folders" id="23" />
        </vfolder>
        <vfolder name="Video" id="2">
          <vfolder name="Actor" id="10" />
          <vfolder name="Album" id="14" />
          <vfolder name="All Video" id="8">
    				<items type="videoItem" />
    			</vfolder>
          <vfolder name="Folders" id="21" />
          <vfolder name="Genre" id="9" />
        </vfolder>
        <vfolder name="Browse Folders" id="21">  
    <shared_dirs full_extend="true" />  
    </vfolder>
      </vfolder_layout>
    </fuppes_vfolder_config>
    

参考文献

赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏