Saturday, January 31, 2009

Mediatomb and Playlists

I found a few issues adding playlists (m3u files) to Mediatomb. It works, but there are problems I have not been able to completely pin down. The main thing is that I have to add the individual playlist files to Mediatomb rather than depending on a timed rescan or a directory. When I time-rescan a directory containing a new playlist (only), the load operation appears in the Mediatomb console, but the playlist never appears in the database. If I add the single file however, and the list file has not been previously scanned, it works.

Also, once a directory is processed by a timed rescan, I have trouble adding new playlist files, individually, from that location. A couple of weeks ago, inexplicitly, a playlist I had previously used without trouble disappeared from Mediatomb, and I could not add it back (no errors, it just didn't show up). I removed my other playlists and found I could not add those back either. So I made a brand new file, and that would not add. To fix this I had to be sure that the directory and all playlists were removed from Mediatomb, and there were no timed rescans on that folder. I added back each m3u file individually, and they worked fine.

I think it's best to stay away from timed rescan, on my installation away, for playlists (I've had no trouble with rescans of music, video and photo files). I should note that this feature is supposed to work. And I should note that I have seen Mediatomb pick up m3u files on timed rescans from my music folders in the past. But from my playlist directory, I've had odd behaviors (no, this is not related to file/diectory permissions in my case, that is a common problem though. Check that if it is not working for you).

For creating playlists I have been using fapg. This worked well for me because I had already some long lists of files to work with and fapg can take these simple lists on stdin. Many people that use Mediatomb and similar servers use other media handler just to create playlists. I have been experimenting with juk. Juk seems to be particularly suited to larger collections (a problem I have with many of these tools is that they simply have not been designed for large and well organized media collections, with correct tags and such). There are other choices. I've seen Rhythmbox mentioned quite a bit. Such tools tend to support media playing or streaming on their own, but they also have nice playlist editors and search features that are useful alone.

One of the reasons I have been working to replace the system I had built myself, is that more standard bits and pieces (like m3u files) will allow me to use a variety of off the shelf packages (there are any number of programs available to edit playlists and now I can use any one, or more than one). There are also other servers and clients that support the same protocols. One does not have to be limited to one combination, if one server is better than another for, say, one type of content or another.

8 comments:

  1. Anonymous3:16 AM

    Hi Jeff,

    Thanks for the follow-up but I'm still struggling. I now have a playlist visible in MT. Double clicking it (via UI browser on PC) opens WMP and plays the tracks. Great but not the point.

    On the PS3, the playlist appears as "unsupported data". I know the PS3 has adheres very strictly to the DLNA standards and UPnP protocols and am wondering whether the .m3u playlist must be of the fully extended type? ie. include track length, etc, etc? Any ideas?

    If you could post a snippet from one of your playlists so I could see the format and also maybe a snapshot of how exactly the playlist is defined in MT (in particular, object/mime type), that would be a great help.

    ReplyDelete
  2. Sure, here's the first part of a playlist I have used:

    #EXTM3U
    #EXTINF:350,Art Blakey - Never Never Land
    /mp3/jazz/ArtBlakey/Kyoto/audio_02.mp3
    #EXTINF:512,Art Blakey - Nihon Bash
    /mp3/jazz/ArtBlakey/Kyoto/audio_04.mp3
    #EXTINF:393,Dexter Gordon - Cheese Cake
    /mp3/jazz/DexterGordon/Go/audio_01.mp3
    #EXTINF:321,Dexter Gordon - Where Are You
    /mp3/jazz/DexterGordon/Go/audio_05.mp3
    #EXTINF:507,Tito Puente - Medley
    /mp3/latin/TitoPuente/ElRey/medley.mp3
    #EXTINF:479,Art Pepper - Rita-San
    /mp3/jazz/ArtPepper/NoLimit/audio_01.mp3
    #EXTINF:525,Art Pepper - Ballad Of The Sad Young Men
    /mp3/jazz/ArtPepper/NoLimit/audio_02.mp3
    #EXTINF:569,Art Pepper - My Laurie
    /mp3/jazz/ArtPepper/NoLimit/audio_03.mp3
    #EXTINF:761,Art Pepper - Mambo Da La Pinta
    /mp3/jazz/ArtPepper/NoLimit/audio_04.mp3
    #EXTINF:758,Art Pepper - No Limit

    One thing about the PS3 is that you have to be in the music part of it's menu to play music. Mediatomb will show up under video and photos also, with the same objects, but music will only play under music, videos under video, etc.

    Also check that your playlist shows up in Mediatomb's database. It should create a new Playlist heading for these objects. This heading shows up on the PS3 also.

    ReplyDelete
  3. Anonymous12:06 PM

    You said "Also check that your playlist shows up in Mediatomb's database. It should create a new Playlist heading for these objects. This heading shows up on the PS3 also."

    How exactly are you manually importing the playlist if MT should automatically create a new container for them?? I created a new container then added a new item.

    ReplyDelete
  4. On the left hand side of the Mediatomb web application is a browser that can be selected as either database or file system (up at the top is the selector). What I do, to add the first m3u file, is use this Mediatomb web app on the file system side (as opposed to the database side), browse the m3u file, select it and click the plus sign. Then, switching to the database side, I see a new "Playlist" section added, and the new playlist file listed there. Subsequently added m3u files appear under that heading also. And that heading then also appears on the PS3. The Playlist heading is not there until the first playlist file is added.

    ReplyDelete
  5. Anonymous1:12 PM

    I got it working!!

    I finally figured out why when clicking the +, nothing whatsoever happened - the contents of my .m3u file couldn't be found. This is what every playlist creator I tried output:

    #EXTINF:250, - -
    \\DAB-SLUG\disk-1\MB-Media/MB-Music\MISC\James Morrison ft. Nelly Furtado - Broken Strings.mp3

    My MediaTomb installation is actually running on the DAB-SLUG device (an Unslung Linksys NSLU2). disk-1 is the HD storing all the media. I needed to replace all references to //DAB-SLUG/disk-1 with /public and swap the slashes around. BINGO!

    For completeness, a sample playlist entry for MT running on a SLUG should be of the form:
    #EXTINF:250, - -
    /public/MB-Media/MB-Music/MISC/James Morrison ft. Nelly Furtado - Broken Strings.mp3

    Many thanks for your assistance. I hope this page serves to help others as (previously) frustrated as I.

    ReplyDelete
  6. Mediatomb is pretty quiet when it comes to error messages. I'm not surprised by this.

    You might investigate one of the other supported playlist formats (I didn't), as well as other tools to create playlists. You can hopefully find a combination of tools that gets you good functionality.

    ReplyDelete
  7. Dieter6:26 AM

    I got it working as well!

    I am running the file server ib-nas4220-b from Raidsonic and installed MediaTomb on that box.
    m3u's are located in '\\Ib-nas4220-b\guest-share\Playlists'.

    I created the m3u's with 'Playlist Creator 3.5' configured as follows:
    - playlist items with relativ path
    i.e '../MP3_Pop/Ekseption/Ekseption_-_Ekseption_plays_Bach/194_01_Ekseption_-_Italian Concerto.mp3'
    - use slashes instead of backslashes as 'Anonymous' found out
    - add folders in recursiv mode

    Only if created this way MediaTomb will generate the playlists folder and adds it to the database.

    I am using the Sangean WFT-1 Internet Radio which gets access to the MediaTomb server in the home network
    and after creating the playlists as mentioned I got as well access to the playlist songs.

    ReplyDelete
  8. Anonymous12:01 PM

    Thing with MT is, it needs a *nix resolvable path, be it either a relative or an absolute path. So, if your music is stored under /home/user/mp3/, your playlist should either state this:

    /home/user/mp3/first song.mp3

    or this:

    ./first song.mp3

    The latter is correct if the playlist is stored in the same directory "first song.mp3". Or, better said: files are searched for beginning from the playlists directory.

    Rob

    ReplyDelete