SanDisk Homepage
Sansa View
Register  ·  Sign In  ·  Help
Jump to Page:   1 · 2  |  Next Page
Sansa View on Ubuntu Linux
Options    Options  
MicahCarrick
Newbie
Posts: 9
Registered: 05-20-2008


MicahCarrick

Message 1 of 17

Viewed 15,288 times


This is a copy of my blog post: Sandisk Sansa View on Ubuntu Linux I thought some users of this forum (Linux users) might find it useful.

 

My girlfriend bought an 8GB Sansa View recently and I've been doing a lot of tinkering with it in Ubuntu 8.04 (both AMD64 and x86). Here is some of the knowledge I've gained in regards to the Sansa View and Ubuntu Linux. Please reply if you know any of this to be incorrect.


First of all, there are 2 modes you can use this device in, and they are mutually exclusive as far as working with them in Linux (that is, you don't have access to files added in MTP mode if you mount it in MSC mode).


MSC (Mass Storage Controller) ModeBy default, the device is in MTP (Microsoft Transfer Protocol) mode. More on this later. Most of us linux users are used to using MP3 players in MSC mode which is essentially just a USB flash drive.

Mounting the Sansa View in MSC Mode:

To mount the device in MSC mode, you put the device in hold (slide the power switch down) and then hold down the left button on the direction pad for about 5 seconds and then connect it to your USB port. The device should then auto mount into '/media/Sansa View' as a flash drive and an icon should show up on your desktop.


Getting Rhythmbox To Identify the Sansa View in MSC Mode:

Rhythmbox will not initially identify the device. To get rhythmbox to see the device, you simply place a text file into the root directory of the player named '.is_audio_player' (/media/Sansa View/.is_audio_player). Then it will show up in Rhythmbox and you can drag and drop your music onto it. However, rhythmbox seems to copy the music into the root instead of the 'MUSIC' folder. To change that behaviour, you can edit that '.is_audio_player' file to tell it where to copy the music. The following should work good for a '.is_audio_player' file for the Sansa View:


audio_folders=MUSIC/
folder_depth=2

This method should also work for other audio players like Amarok, Banshee, etc.


Using The Correct ID3 Tags in MSC Mode:

The Sansa View seems to prefer id3v2.3 tags, however, newver versions of id3 tagging libraries often use id3v2.4 tags. I use a program called easytag to organize my tags. You can install easy tag with:


sudo aptitude install easytag

You can setup easy tag to use the correct id3 tags by going into 'Settings' > 'Preferences' and clicking the 'ID3 Tag Settings' tab. You want to change the version setting for the id3v2 tags to 'id3v2.3' and leave it in UTF-16 encoding. Here is a screenshot of my preferences:


Using Easytag for Sansa View id3 tags


Once you change this setting, any files which have tags that are NOT in this version will show up red (unsaved). So you can simply load the folder you store your media in, select all, and save. They should now pass through correctly to the Sansa View in MSC mode (including album art discussed below).


Album Art in MSC Mode:

Album art in MSC mode can be achieved at least 2 different ways (that I've found). First, you can drop a 300x300 jpg version of the album art named 'folder.jpg' into the folder containing the songs for that album (ie: /media/Sansa View/MUSIC/some_artist/some_album/folder.jpg). Secondly, you can embed the 300x300 jpg file into the id3v2 tag. If you have setup easy tag as discussed in the previous section, this will work.

Playlists in MSC Mode:

As far as I can tell, the Sansa View does not support playlists in MSC mode! Correct me if I'm wrong. This was a deal breaker for me which is why I've been working in MTP mode.


MTP (Microsoft Transfer Protocol) ModeIf you're not familiar with MTP, it's a protocol used by many new portable media devices which "synch" up with Windows Media Player (WMP). It's not a file system in the traditional sense that MSC mode is, and thus it doesn't exactly "mount" in Linux (though you can using mtpfs).


It's important to understand that MTP mode is a different animal and the normal rules regarding playlists, album art, and ID3 tags do not apply.


The Sansa View's default mode is MTP, so that's why you aren't seeing an icon popup on your Ubuntu desktop as soon as you plug it in. To use it in MTP mode, you should install libmtp, the library for accessing MTP devices. It's also handy to install mtp-tools and mtpfs which I'll discuss later. You can install all 3 packages using:


sudo aptitude install libmtp mtp-tools mtpfs

Getting Rhythmbox To Identify the Sansa View in MTP Mode:

Open Rythmbox. Select 'Edit' > 'Plugins' and enable 'MTP Portable Devices' plugin. You can now drop your music onto your device in Rhythmbox, however, playlist support isn't quite working and album art is not supported (as of time of writing). I wasn't successful getting playlists and album art working in Amorok or Banshee either, however, since I use Rhythmbox, I didn't try very hard.


Using mtp-tools:

These utilities are some example programs from the libmtp source. Granted you can do just about anything you need to with these tools (create/delete tracks, folders, albums, album art, files, etc.), they are command line tools and doing so can be a bit tedious because of the nature of MTP. But it's a good way to experiment and ensure your MTP device is detected by libmtp. You could also use these tools with your own script if you needs are minimal. Start by typing 'mtp-detect' to find your device. Then type 'man mtp-connect' to see all the commands at your disposal.


About ID3 Tags in MTP Mode:

In MTP mode, the device isn't using the ID3 tags, but instead is given this information when added to the device (typically the program feeding the information *does* pull this from the ID3 tags). So when using the mtp-tools, you'll have to pass the meta data for tracks or albums along with the file.


Mounting The Sansa View As a Filesystem in MTP Mode:

This was a bit buggy for me, but you can try. Using mtpfs (uses FUSE) you can mount your device in MTP mode and browse like any other file system


Mount:
sudo mtpfs -o allow_other /media/SansaView

Unmount:
sudo fusermount -u /media/SansaView

Playlist Support in MTP Mode:

Playlists in MTP mode might work in some audio players in the future, but right now, the support was either non-existent or very buggy. It would be pretty easy to write a script to convert your .m3u or .pla playlists using mtp-tools (mtp-playlists mtp-newplaylist and mtp-delfile), however, I couldn't find anything reliable as of yet. That's why I started writing my own application for MTP devices--specifically my Sansa View. Read below...

MOrganize - A GTK+ Based MTP Media Organzier for Linux:

I'm working on a GUI media organizer as a front end to libmtp... which you can see below:


MOrganize MTP Media Organzier


This project was only started a few days ago at the time of writing, and so it is still in very early development. However, I expect to have some files posted on sourceforge within a couple weeks. Email me if you would like to be emailed when some beta source is available and you can help me test it.


If you want to keep up, the project page is here: MOrganize

05-21-2008 02:31 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
MicahCarrick
Newbie
Posts: 9
Registered: 05-20-2008


MicahCarrick

Message 2 of 17

Viewed 15,286 times


EDIT: In MTP mode, Amarok works very well with the Sansa View including playlist support. Although the album art didn't work for me, I didn't test very thoroughly as I dont' use Amarok and am not going to. However, it seems to be the best option currently avialable for the Sansa View in Ubuntu. You can get it using:

 

sudo aptitude install amarok

05-21-2008 02:46 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
Twistedaura
Sansa User
Posts: 51
Registered: 10-31-2007


Twistedaura

Message 3 of 17

Viewed 15,273 times


Wow, this is a great post. I'm going to float this for users to access it easier.

 

Well done!

05-21-2008 06:20 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
MicahCarrick
Newbie
Posts: 9
Registered: 05-20-2008


MicahCarrick

Message 4 of 17

Viewed 15,242 times


Update:

 

I'm finding that embedding album art into the file using id3v2.3 UTF16 is also working in MTP mode. This is done in easy tag as well. 

05-22-2008 07:39 AM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
prospero
Sansa User
Posts: 21
Registered: 12-11-2007


prospero

Message 5 of 17

Viewed 15,202 times


A while ago, I tried libmtp and the tools it came with to create playlists, but never got it to work. I was hoping to use mtpfs so that I could simply drag-n-drop a file into a "Playlist Folder" or something and create playlists that way. I prefer automated scripts rather than specialized GUI applications. Oh well.
05-22-2008 04:36 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
monktbd
Sansa User
Posts: 30
Registered: 04-08-2008


monktbd

Message 6 of 17

Viewed 15,177 times



MicahCarrick wrote:

EDIT: In MTP mode, Amarok works very well with the Sansa View including playlist support.



 

First of all: thanks for writing that all up. 

 

Did you ever check if the playlists themselves also appear on the View in the playlist menu? The files in the playlist do appear and get transferredand the actual playlists as well because they are visible again in Amarok or Gnomad2 after reconnecting.

However they do not show up in the Views playlist to be actually played.

 

Did you ever get a playlist to not only transfer but actually show up on the view to be played?

Is that something that would either work with the commandline tools of libmtp or with your frontend to it?

 

Additionally I would like to add to use albumart-qt for tagging album art directly into the mp3. It can be found here.

Its advantages are that it automatically searches the internet for cover art, downloads it and embeds it into all files of the album. I found that a bit easier to use than downloading the cover from somewhere and manually adding it with easytag to the mp3s of an album.

05-22-2008 09:30 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
MicahCarrick
Newbie
Posts: 9
Registered: 05-20-2008


MicahCarrick

Message 7 of 17

Viewed 15,149 times


You're right, the amarok playlist is not showing up on the device's interface. I'm pretty sure I was able to get one transfered over in earlier tests, but not sure. I'm actually about to start implementing playlist support in my app Morganize (screenshot) now that it's able to add/delete tracks with album art. I'll probably get to tinkering either tonight after work or over the weekend.

 

I'll post what I learn about playlists using libmtp and the mtp-tools. 

05-23-2008 10:21 AM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
MicahCarrick
Newbie
Posts: 9
Registered: 05-20-2008


MicahCarrick

Message 8 of 17

Viewed 15,126 times


By default, libmtp creates playlists with a .zpl extension (from the Creative Zen devices) as that's the only thing they had seen when they wrote it. The Sansa View will only recognize .pla extensions for playlists. I have setup my application (MOrganize) to allow overriding that extension when creating new playlists and it's working fine.

 

However, I let the libmtp develop know and he put a hack into the version currently in CVS which uses .zpl on the Zens and .pla on anything else. I just tested this CVS version and it worked great with my Sansa View. So, this playlist issue should be resolved in upcoming versions of libmtp.

05-23-2008 05:34 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
monktbd
Sansa User
Posts: 30
Registered: 04-08-2008


monktbd

Message 9 of 17

Viewed 15,120 times


Hi Micah,

 

I saw  your posts on the libmtp mailing list.

Thanks a big bunch for bringing it up there!

Looks like I need to check the latest CVS now and/or will try your app :smileyhappy:.

 

Looks like I will finally switch to use MTP now.

05-23-2008 07:05 PM  

  Reply   Reply  
Re: Sansa View on Ubuntu Linux
Options    Options  
thespot
Newbie
Posts: 9
Registered: 06-03-2008


thespot

Message 10 of 17

Viewed 14,729 times


Bumping this to ask, will these same rules apply for the Fuze ?

 

D, 

06-05-2008 11:38 PM  

  Reply   Reply  
Jump to Page:   1 · 2  |  Next Page

Home | Consumer Products | Downloads | Support | Partner's SellPoint Access | Business Products | Corporate | Contact Us
© 2007 SanDisk Corporation | RSS | Sitemap | Trademark Info | Flash Memory Settlement | Official Sweepstakes Rules