See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: How to get a Music mp3 files Properties

  1. #1
    Member
    Join Date
    2021-04
    Posts
    9
    Login to Give a bone
    0

    Default How to get a Music mp3 files Properties

    Is there a way using AutoLISP, vl-*, & vla-* functions to get the file properties from a mp3 music file?
    Using Windows Explorer when you right-click on a mp3 file, and select Properties from the list, and open the Details tab. Here are three properties that I would like to be able to get the current value. They are Title, Contributing Artist, and Album.
    For example the function might look like: (setq TitleName (GetMp3FileProperties "C:\\MyMusic\\ThisSong.mp3" "Title")
    I appreciate any advice and help with this.
    Thank you,
    Adam

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: How to get a Music mp3 files Properties

    Have you looked into using the File System Object to gather this information? There are plenty of places documenting the methods and properties of that object elsewhere. Of course, once you access the File System Object, you can always vlax-dump it to find the available properties or methods.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  3. #3
    Member
    Join Date
    2021-04
    Posts
    9
    Login to Give a bone
    0

    Default Re: How to get a Music mp3 files Properties

    Hi,
    I'm still learning about AutoLISP and need a little help with this. Do you have an example of some code to get me started, or a link to a forum discussion that might help.
    Thanks

  4. #4
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    1

    Default Re: How to get a Music mp3 files Properties

    I managed to get to a MP3 as a VL object but can not find the internal details ?

    (setq obj (vlax-create-object "Scripting.FileSystemObject"))
    (setq drives (vlax-get-property obj 'Drives))
    (setq fdrive (vlax-get-property drives 'Item "C:"))
    (setq root (vlax-get fdrive 'RootFolder))
    (setq sub (vlax-get root 'SubFolders))
    (setq music (vlax-get sub 'item "MyMusic"))
    (setq files (vlax-get music 'Files))
    (setq mp3 (vlax-get files 'Item "thissong.mp3"))
    (vlax-dump-object mp3)
    Ok 2nd go Using the free tool 'exiftool' I have used this and can export to a file what it finds I used it on JPG's to read lat long from mobile phone photos. You may need to write a Bat file so windows finds exiftool. Can use Shell inside lisp from Acad, maybe add path to exiftool.

    exiftool -filename -gpslatitude -gpslongitude -T "p:\2015 projects\2015104\photos" > out.txt

    exiftool -Title -T "F:\music\03 Blame It On Me.mp3" > d:\acadtemp\out.txt

    Just add more items -Name etc
    Last edited by BIG-AL; 2022-07-29 at 02:39 AM.

  5. #5
    Member
    Join Date
    2021-04
    Posts
    9
    Login to Give a bone
    1

    Default Re: How to get a Music mp3 files Properties

    Hi Big-Al.
    Phanaem on autodesk.com referred to a very useful autolisp program written by MP Michael on the Swamp, that creates a data list of everything you can think of about any file. It's definitely a great utility.
    Here the link: http://www.theswamp.org/index.php?to...0850#msg430850

  6. #6
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    0

    Default Re: How to get a Music mp3 files Properties

    Thanks saved a copy who knows in future.

Posting Permissions

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