Mark M. Hoffman on 25 Feb 2009 16:30:27 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] mini-HOWTO: mp3fs


Hi all:

WHAT IS IT?

I recently found a project called mp3fs.  It's a userspace filesystem for Linux
that converts FLAC files to MP3 on the fly.  E.g. if you have a directory with
the following three files...

	.../music/
		song1.flac
		song2.flac
		song3.flac

... you can use mp3fs to create a new filesystem that looks like this:

	.../mp3/
		song1.mp3
		song2.mp3
		song3.mp3

The virtual filesystem contains the same files as the real one, except that 1)
all files are read-only, and 2) any FLAC file is converted to mp3.

Also note: mp3fs supports most (but not all) ID3 tags; these will appear in the
mp3 file also.

WHY DO I WANT IT?

I store all my music in the FLAC format; it is a lossless format that is
supported by all the Linux apps I care about.  However, most consumer devices
(mp3 players, newer TVs, game systems, etc) that can play music from network
storage do not support FLAC at all.  The mp3fs filesystem allows me to use all
of these other devices without re-encoding my whole library - it saves a lot of
time and storage at the small cost of a bit of CPU time while reading the file.

HOW TO...?

These instructions are for Ubuntu 8.10.

1) Install prerequisites (some of which require multiverse)

	fuse-utils
	libfuse2
	libfuse-dev
	libflac-dev
	flac
	libflac8
	libid3tag0-dev
	libmp3lame-dev

2) Download mp3fs source code (latest as of today is 0.13)

	http://mp3fs.sourceforge.net/

3) Unpack, configure, build

	$ tar xzf mp3fs-0.13.tar.gz

	$ cd mp3fs-0.13

	$ ./configure

	$ make

4) Install (will put mp3fs in /usr/local/bin)

	$ sudo make install

5) Add an entry to /etc/fstab

	# MP3FS mount (flac files are in /mnt/flac)
	mp3fs#/mnt/flac,128 /mnt/mp3 fuse ro,allow_other 0 0

6) Mount your new virtual filesystem

	$ sudo mount /mnt/mp3

... and there you have it.  For use with consumer devices, you'll probably want
to add this new filesystem as a SAMBA share.

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug