Arduino Music Fader

Hi there,
I saw you linked to my topic. I think that it will work for your project, there is only one thing I am not sure of: How does the arduino know when the song is ending? Can you somehow retrieve the song length from the music file?