Linux playlist Creator

After some trial and error I finally got my Sansa Clip to recognize playlists [m3u]. I did this using EasyTAG on a Debian box. The EasyTAG version used was the one which ships with Debian Unstable.

Thought I would document it here for someone who might need it.

Steps Ive followed:

  1. Connect the Clip to the PC in MSC mode[this is default in Linux].
  2. Open EasyTAG and browse to the music folder of the Clip. In my case it was /media/SANSA M340/MUSIC. [ I had just one folder under MUSIC and it was named Running Assorted and it contained all my music files]. Your music collection should show up in the midle pane.
  3. Select the Files you want to create into a playlist in the middle pane of EasyTAG. [You can also make ID3 tag changes to the music files if you want]
  4. Once selected, Click on the Write Playlist icon in the toolbar [third from right].
  5. The Generate A Playlist window should now pop-up. This is the important part , ensure the choices you make here are similar to mine.
    5a. M3U Playlist Name : Choose Use mask and give it a name. Example: test [ no need for file extension]
    5b. Playlist Options: Ensure Include only the selected files is selected.
    5c. Ensure Use relative path for files in playlist is selected.
    5d. Ensure Create playlist in the parent directory is selected.
    5e. Ensure Use DOS directory selector is selected.
    5e. Playlist Content: Select Write info using filename.
  6. Click on Save button.
  7. You should now have a playlist file named test.m3u in the MUSIC folder.
  8. Unmount the device and check if the playlist is showing up now.

NOTE: Sometimes the Refresh Database doesnt work and the playlist might not show-up. Ensure that a DB refresh happens when you disconnect from the PC.

EasyTAG is available as Free Software for Linux and Windows [//easytag.sourceforge.net/] . I havent tested on windows. If you have anything to add please do so

Just a thought you could add something to the Comment Tag of each song you like, e.g. FAV-ROCK FAV-DRIVE FAV-PARTY or more than one, then do the search in Tag with case sensitive so the search will only choose these. You can do multiple searches.

The other way is to make a playlist of all music from its root, e.g. Music. Then grep out what you want into a separate file [make sure you have the #EXTM3U line at the top.

Example my-rock.m3u

#EXTM3U
#EXTINF:296,01. Walk On Water.mp3
Music\Aerosmith\Big Ones\01. Walk On Water.mp3
#EXTINF:322,02. Love In An Elevator.mp3
Music\Aerosmith\Big Ones\02. Love In An Elevator.mp3

#EXTINF:308,14. Angel.mp3
Music\Aerosmith\Big Ones\14. Angel.mp3
#EXTINF:381,15. Livin On The Edge.mp3
Music\Aerosmith\Big Ones\15. Livin On The Edge.mp3

The format is #EXTINF:nnn,title.mps followed on the next line with full path. The nnn is the length of the track in seconds.

You could cat my-rock.m3u | grep "Angel.mp3 >> Drive-List.m3u and so on

It would be nice to do cat my-rock.m3u | grep Aerosmith | grep Angel.mp3etc, to ensure you get the right song by the right artist but you would not get the #EXINF lines.

From looking around the web you apparently may not need the #EXT lines so a simple list of all the full paths to your chosen tracks in a file ending .M3U might work with you MP3 player. I suggest you experiment.

Video liên quan

Chủ Đề