Search:  
Gentoo Wiki

Fuppes

Contents

About FUPPES

FUPPES or the "Free UPnP Entertainment Service" is an advanced UPnP server capable of streaming content to a wide variety of UPnP/DLNA devices such as XBox360 and PS3. In addition to supporting a huge selection of hardware/software clients, FUPPES also supports on-the-fly transcoding and individual configuration for each device/type of device connected. It also supports customized virtual data organization structures.

If you are looking for a linux alternative for Windows Media Connect, Winamp Orb or Windows Media Player 11 to stream music, pictures and video to your media extender, FUPPES could be your thing.

If FUPPES for some reason might not suit you, here are some alternatives:

ebuild

FUPPES is so new that it has no ebuild in portage yet, however bug 209490 does contain a working ebuild. To install this you will need to follow the HOWTO Installing 3rd Party Ebuilds. Make sure that you download the most recent version of each attachment and place them in the files directory. Note that based on comment 15 you need at least version 0.4.9_p20080326 of ffmpeg.

Dependencies

The alternative is to compile fuppes. In this case, we start out by making sure we have all packages needed for FUPPES. Note that the following list is for all features in FUPPES, including transcoding support. Most dependencies are derived from the Ubuntu guide on the FUPPES site.

Run the following command to install any missing packages (note that as a Gentoo user you will have most of these already):

emerge -avu automake autoconf gettext libtool libpcre pkgconfig libxml2 sqlite3

That will give you the needed packages to compile FUPPES, use the next command to add media support:

emerge -avu giflib taglib imagemagick libvorbis twolame faad2 libsndfile libmpcdec ffmpeg

Compiling

Now that we have all the packages for FUPPES we can finally compile it.

We will now use the SVN version which requires the package 'subversion' to get it. If you use an official release, extract the archive and continue with the 2nd command:

# svn co https://fuppes.svn.sourceforge.net/svnroot/fuppes/trunk fuppes
# cd fuppes
# autoreconf -vfi
# ./configure --prefix=/usr --enable-video-transcoding
# make
# su -
# make install

If you get this error during "make":

In file included from transcoder_ffmpeg.cpp:27:
ffmpeg/ffmpeg.h:54:23: error: swscale.h: No such file or directory
ffmpeg/ffmpeg.h: In constructor ‘CFFmpeg::CFFmpeg()’:
ffmpeg/ffmpeg.h:287: error: ‘SWS_BICUBIC’ was not declared in this scope

you'll need to fix fuppes/src/plugins/ffmpeg/ffmpeg.h. This is caused by a minor change in ffmpeg's headers that happened a while ago. Simply change the lines in fuppes/src/plugins/ffmpeg/ffmpeg.h (around line 53) that say:

#ifdef HAVE_LIBSWSCALE
 #include <swscale.h>
#endif

to

#ifdef HAVE_LIBSWSCALE
 #include <libswscale/swscale.h>
#endif

Configuring

Create directory for FUPPES to do its thing:

mkdir /etc/fuppes

init.d Script

There is an init.d script attached to bug 209490 which can be used to start/stop fuppes using Rc-update.

Launcher Script

Alternatively create a launcher script for FUPPES to make sure it will use /etc/fuppes for all its files instead of ~/.fuppes/ (the default):

# nano -w /usr/sbin/start-fuppes

Insert the following script:

#!/bin/bash
FUPPES_NAME="Media Server"
FUPPES_DIR=/etc/fuppes/
FUPPES_CONFIG=$FUPPES_DIR/fuppes.cfg
FUPPES_DB=$FUPPES_DIR/fuppes.db
FUPPES_VFOLDER=$FUPPES_DIR/vfolder.cfg
# Run fuppes with the new settings
/usr/bin/fuppes --config-file $FUPPES_CONFIG --database-file $FUPPES_DB --vfolder-config-file $FUPPES_VFOLDER --friendly-name "$FUPPES_NAME" --log-level 1 --log-file /var/log/fuppes.log

Set FUPPES_NAME to the name you want to see in the network when you browse for uPNP servers. Note that we let FUPPES log all its activities. You can tweak the amount of debug output by increasing the level: 0-none, 1-normal, 2-extended, 3-debug.

Make it executable:

chmod +x /usr/sbin/start-fuppes

Start fuppes using the new script we just made. After it starts, enter the NIC name of your LAN (usually eth0) and hit enter then kill it by Ctrl+C as we will do the initial configuration by hand. If you wish to use the webbased interface instead, now it the time to do so: check the output of FUPPES for the web address and send your browser there, happy streaming!

For those who want to continue with the manual configuration, read on.

FUPPES will now have created a default config in /etc/fuppes/fuppes.cfg (if you haven't modified the paths above). Open up the config and start by settings the media folders FUPPES should monitor.

<fuppes_config ...>
   <shared_objects>
   </shared_objects>

If you are not familiar with XML, please stop reading now and go to the webbased configuration as you will possible break fuppes.cfg by manually editting.

Insert some dir tags in shared_objects to add the folders you want to monitor. For iTunes support (and the accompanying vfolder layout support), see the FUPPES Wiki on iTunes

Next scroll down to the http_port tag. I replaced that one with '<http_port>8080</http_port>' to be able to remember it and not bug Apache in the mean time.

Browse through the other values for things to set but for most people, it is time to switch to the web interface. Xbox 360 and Playstation 3 owners, please read the following section first.

Xbox 360 and Playstation 3 support

Remember the media sharing for next gen consoles? Well you need to turn that on by hand. Edit /etc/fuppes/fuppes.conf again but this time scroll to the bottom to the device tags with the right names: Xbox 360 or PS3. Change 'enabled' to true.

Next, find the use_fixed_uuid tag and set it to true, otherwise the Xbox 360 thinks a new device has been found every time you restart FUPPES.

Because for some reason the Xbox360 does not see any media up to this point I had to insert the following in the device tag for the Xbox 360:

<device name="Xbox 360" ...>
   ... 
   <file_settings>
      <file ext="mp3"><type>AUDIO_ITEM_MUSIC_TRACK</type></file>
      <file ext="jpg"><type>IMAGE_ITEM_PHOTO</type></file>
      <file ext="avi"><type>VIDEO_ITEM</type><mime_type>video/avi</mime_type></file>
      <file ext="mkv">
         <type>VIDEO_ITEM</type>
          <mime_type>video/x-msvideo</mime_type>
          <transcode enabled="true">         
             <transcoder>ffmpeg</transcoder>
             <ext>wmv</ext>
             <mime_type>video/x-ms-wmv</mime_type>         
             <video_codec>wmv2</video_codec>
             <audio_codec>wmav1</audio_codec>
             <video_bitrate>1800000</video_bitrate>
             <audio_bitrate>128000</audio_bitrate>
          </transcode>
       </file>
    </file_settings>

Note the entry for .mkv files, with this you enable transcoding for mkv video to wmv output. You can do this for all types supported by ffmpeg that won't play on your next gen console. You could consider switching to MPEG 1 as it encodes a lot faster but that is personal preference.

For me ({{{}}}) that was not enough, I had to create /etc/fuppes/vfolder.cfg and put this into that file:

File: /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">
        <folders filter="contains(videoItem)" />
      </vfolder>
      <vfolder name="Album" id="14" />
      <vfolder name="All Video" id="8">
				<items type="videoItem" />
			</vfolder>
      <vfolder name="Folders" id="21">
			   <folders filter="contains(videoItem)" />
      </vfolder>
      <vfolder name="Genre" id="9" />
    </vfolder>

  </vfolder_layout>
 </fuppes_vfolder_config>


Note that this is not the optimal vfolder layout but it works.

Now save and start FUPPES and enjoy (transcoded) media on your next gen console ^-^

Retrieved from "http://www.gentoo-wiki.info/Fuppes"

Last modified: Mon, 15 Sep 2008 09:15:00 +0000 Hits: 3,620