Browsing your Creative Zen Vision M mp3 player with MTPfs
July 11, 2008
Written by Daniel Felix Ferber (techtavern.wordpress.com)
This article explains how to browse your Creative Zen mp3 player from Linux command line, using MTPfs. MTPfs is a fuse file system implementation that wraps libmtp. libmtp is an open source implementation of the MTP (Media Transfer Protocol), intended to transfer for media files from/to players.
With MTPfs, you can also transfer, copy, rename and remove files, although these latter ones are not implemented efficiently.
MTPfs offers effective freedom to store and organize your music library on the player. Specialized synchronization software on Linux (like Amarok, Nomad/Zen Jukebox, Rhythmbox) force a simple organization and do not fit well on large capacity players.
Background
Nearly all mp3 players are connected to an USB port in order to transfer files from/to the computer. Most use either MSC or MTP protocol. Some other players use propertary protocol, like the iPod players.
MSC is a standard supported on the most recent operating systems (including Linux starting from Kernel 2.4). MSC allows the player to behave like a file system that stores any files, where audio files are recognized by the player.
MTP is a standard that extends the MTP protocol (the one to transfer photos from a digital camera) in order to support transfer of audio files. It is heavily promoted by Microsoft to guarantee compatibility of players and Windows Media Player.
Consider upgrading the players firmware
First, connect the player to your PC, using the USB cable. The player should keep working, that means, continuing playing music, navigating in the menu, etc (whatever it was doing before). If the player blocks/freezes, and remains blocked even when you disconnect the player again, then you need to upgrade the players firmware.
If you player blocks/freezes, you need to reset it (a kind of ctrl+alt+del), see the “how to” at Creative Support.
You can find newer versions of firmware here (you will have to search and browse a bit until you find it, no direct link available, sorry).
Configuring, compiling and installing on Linux
First, it is necessary to assure that fuse (filesystem in userspace) is working properly. Fuse is a loadable kernel module that allows non-privileged users to mount their own virtual file systems. An interesting how-to about fuse can be found at this link.
Most recent Linux distros are shipped with fuse out of the box, or fuse is easily available on a default package repository. Important: do not forget to add your user to the fuse group, or you will not have permissions to work with fuse. If you are running a GUI, then you also need to logout and login again.
Also, following dependencies need to be installed (if not already installed by default): libmad, libid3tag and libmtp.
Currently, Linux distros have not MTPfs packages available. Therefore, you need to compile and install MTPfs on the old fashioned way. Download and extract the file from: http://www.adebenham.com/mtpfs. Then, compile and install. Here are the commands:
$ wget http://www.adebenham.com/mtpfs/mtpfs-0.7.tar.gz $ tar xzf mtpfs-0.7.tar.gz $ cd mtpfs-0.7.orig $ ./configure $ make all
And finally, as root:
# make install
Mounting, unmounting MTPfs
Create a directory where you want to browse your player. Like:
mkdir /media/mtpplayer
Mount the player. The Creative Zen Vision player will stay locked while it is mounted with MTPfs.
mtpfs /media/mtpplayer
Browse as you would do with any file system:
cd /media/mtpplayer/Music ; ls
After finished, unmount. The player will automatically update its database.
fusermount -u /media/mtpplyer
Note: you do not user the umount command, but fusermount instead!
User experience
All tests were performed on a 60GB Creative Zen Vision M mp3 player, with about 1500 audio files and 70% storage capacity used.
After mounting, the player will remain busy for one or two minutes. Meanwhile, the console remains blocked. MTPfs is caching the directory structure into memory, operation that may take a while on a large capacity player with many files. Caching is an recurring operation that takes some time and is probably the most annoying drawback of MTPfs.
Only one file system operation can be carried out at once with MTPfs. This limitation seems to be inherent to the MTP protocol. When using KDE browser (konqueror), then MTPfs crashes.
Creating directories woks well and is probably one of the most important feature to organize the music library according to your preferences. Copying files from/to the player works reasonably fast, although the console will remain blocked for some time.
Deleting files is very painful because it is very, very slow (about 1 minute per file). It is recommended to unmount MTPfs, delete the files or the album from the player, and then mount the filesystem again. Observing the players behavior, I suppose that it reloads the entire directory cache after every removed file.
Due limitations of the MTP protocol, it is not possible to open and write a file on a MTPfs. In order to edit a file (like updating id3tags), you need to copy the audio file to a temporary directory, edit the file, and copy it back to the MTPfs.
Open issues
MTPfs is still very slow compared to implementations under Windows and its poor performance on Linux can be annoying.
After transfering audio files, the player does not recognize album art stored as id3tag. Probably, this issue is related how the image was stored as jpg, or some incompatibility of libid3tag and the Creative Zen Vision M player.
References
Click on the links for each topic for references:
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed