Rhythmbox + MP3FS + iPod= 2/3 of each song?

EDIT: SOLVED!! See below!

To explain this cryptic headline, I have to clear some terms with you first:

  • Rhythmbox – the default music player on Ubuntu. Can be used to transfer mp3s to my iPod
  • MP3FS – a user-space file system that allows you mount a directory containing flac onto some other mount point, and then lets other programs looking into this directory see the flac files as mp3s. /myMusicDir/elvis.flac then becomes /myMp3s/elvis.mp3.
  • iPod – mp3 player that can be used under Linux

Actually there is a fourth component to the mix I use to listen to my music; sshfs, which is a program that allows me to access remote directories over Secure Shell (ssh) as if they were local. But I don’t think this part is too vital in my problem. Which I finally come to now:

When transferring songs from my Rhythmbox library to my iPod player only 2/3 of each song gets transferred! I first noticed this with a Dolly Parton album where each some only played until approximately one minute remained. Never exactly one minute, so I didn’t really see the logic.

Not until I noticed this on lots of other files as well, where up to three minutes of each song was lost! I then checked on my iPod the number of seconds left, and calculated the percentage of the total. In every case it turned out to be more or less 33.3%. Why is this so?

I will try to look into this a bit further. Right now, the number of potential error sources are too high (sshfs, mp3fs, rhythmbox).

Will be back with more info. edit: Case solved!

Solution to the mystery

After conducting some very stringent tests, where I basically wiped the whole Rhythmbox library, and tried out various scenarios, I was not able to reproduce the bug! That was strange, I thought, and tried using the old library again. Yes, the bug reappeared! Then by coincidence I glimpsed a part of the details tab that I had ignored so far. Bitrate.

For this track, it clearly says it has a bitrate of 128k, but I knew that on my server I had chosen to up the bitrate to 192 k. As it happens to be, 128 is exactly two-thirds of 192. The solution was at hand. I remounted the mp3fs directory (server-side), and tried uploading the songs to the iPod again. It worked! They played the full length.

The answer was that at the time Rhythmbox searches through the file system, adding songs to the library as it goes, it also records a lot of data about each song (the following is not a complete entry):

<entry type="song">
    <title>Headless Cross - 06 - Call Of The Wild</title>
    <genre>Heavy Metal</genre>
    <artist>Black Sabbath</artist>
    <album>Headless Cross</album>
    <duration>319</duration>
    <location>file:///mnt/timbuktu_mp3/black_sabbath06.mp3</location>
    <bitrate>320</bitrate>
    ...
</entry type="song">

This information is then used when updating the iPod database. The iPod does get the whole file, but it does not use the metainfo contained in the file, but rather the information in its database. Which in my case was not valid, since I had changed the bitrate since adding the song …
So to transfer my mp3s now, I just choose the «old» 128kbps setting on the server, but in a while I hope I will be able to write a little program to update the information, so that I can use higher quality setting without needing to add all the songs again (which is a lengthy process).

Ett svar til Rhythmbox + MP3FS + iPod= 2/3 of each song?

  1. […] transparently transcoding flac files to mp3s when for instance adding songs to my iPod. This has mostly worked fine. Mp3fs transcodes my flac files and uses the comment section in them to make the id3 […]

Legg igjen en kommentar

Fyll inn i feltene under, eller klikk på et ikon for å logge inn:

WordPress.com-logo

Du kommenterer med bruk av din WordPress.com konto. Logg ut / Endre )

Twitter picture

Du kommenterer med bruk av din Twitter konto. Logg ut / Endre )

Facebookbilde

Du kommenterer med bruk av din Facebook konto. Logg ut / Endre )

Google+ photo

Du kommenterer med bruk av din Google+ konto. Logg ut / Endre )

Kobler til %s

%d bloggers like this: