Results 1 to 3 of 3
  1. #1
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Getting MP3 and WAV details (Access XP)

    I want to catalog a cd collection.
    Now being lazy I don't want to type it
    I have the files stored on me Hard Drive in MP3 format
    I can get the Artist and Album from the Folders
    I can get the Track name and number from the file name
    I can get the Track size in Kb from the size

    In explorer, all this info is available in the detail form inc the duration
    Can this be read anyway?
    I have been using the file scripting object
    to collect the details from the directory.

    Can the duration be read directly?

    At the moment I calculate it using the algorithm

    Duration = SizeKb/1024/703.9

    This give a pretty good duration in Minutes

    I then use int and mod to get this to minutes and seconds

    1.Can it be done as a direct read.
    2. Can it be done from the CD directly without the need to save as an mp3 first

    Just an academic interest.
    Andrew

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Getting MP3 and WAV details (Access XP)

    As a general rule of thumb, the answer is no. The duration is a function of the file format (WAV, MP3, etc), and also of the sampling rate, the compression rate and the number of channels. If it is a WAV file, you should be able to get pretty accurate though, as you can probably assume it is 2 channels and is sampled at 44KHz if it comes directly from a CD. Of course there are programs that will tell you the details, but they have to actually open the file (even explorer does that for media files), as the directory structure doesn't contain that kind of info.
    Wendell

  3. #3
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Getting MP3 and WAV details (Access XP)

    Thanks.
    I'll stick with my method then.
    My conversion works fine for a 96 sample rate MP3, and if I decide to use a different sample rate I will work out the conversion for that.
    I never use wav files because they are too big for storage.
    If I need to use wma then I will recalculate, but my portable mp3 player cannot play wma's anyway.
    Andrew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •