Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Reading ID3 Tags from .MP3 files

Reading ID3 Tags from .MP3 files

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comjson
8 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ernesto D
    wrote on last edited by
    #1

    Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

    C M D M RaviBeeR 7 Replies Last reply
    0
    • E Ernesto D

      Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      It's at the end, ID3 v1 is clear text, v2 is compressed. There's a number of free classes on the web that do it, I don't have any of them anymore, sorry. Please don't use fopen, unless you're using C and not C++. Use iostreams where you can. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

      1 Reply Last reply
      0
      • E Ernesto D

        Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        have a look at http://www.id3.org/[^]


        Maximilien Lincourt Your Head A Splode - Strong Bad

        1 Reply Last reply
        0
        • E Ernesto D

          Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

          D Offline
          D Offline
          Dominik Reichl
          wrote on last edited by
          #4

          Go to http://www.wotsit.org and search for "MP3". :) Best regards, Dominik


          _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

          1 Reply Last reply
          0
          • E Ernesto D

            Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            ID3v1 is cake, seek 256 bytes from the end, and if the first three bytes are "TAG", then a tag is present. ID3v2 is way more complicated, check out id3lib for free source code that reads v2.x tags. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- You cannot stop me with paramecium alone!

            1 Reply Last reply
            0
            • E Ernesto D

              Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

              RaviBeeR Offline
              RaviBeeR Offline
              RaviBee
              wrote on last edited by
              #6

              Ernesto, I use Id3Lib[^] in MP3 Pal[^]. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

              1 Reply Last reply
              0
              • E Ernesto D

                Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

                S Offline
                S Offline
                sps itsec46
                wrote on last edited by
                #7

                CodeProject has an answer for nearly everything: http://www.codeproject.com/audio/cmp3info.asp[^] Regards, mYkel

                1 Reply Last reply
                0
                • E Ernesto D

                  Hi, i know this question has probably been asked 1 million times (but i cant seem to find an answer) How can you read the ID3 tag (track name, artist, etc) from an mp3 file WITHOUT using COM, Media player extensions, etc. ONLY whats in the C++ std lib and the W32 API?. i figure that this information is probably written in all mp3 files at a fixed position (the start probably?) along with its lenght, if so, i guess it would be realatively easy to just open the file the "raw" mode (via fopen(), CreateFile() or whatever), read the lenght of the info, create a buffer with the proper size, and put the info itself in the buffer. Can anyone point me in the proper direction? Thanks!

                  E Offline
                  E Offline
                  Ernesto D
                  wrote on last edited by
                  #8

                  Thank you all for your answers, i think ill go with the id3lib. Thanks!

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups