Miscellaneous

  Home arrow Miscellaneous arrow Working with MP3 ID3 Tags in FTP Serve...
MISCELLANEOUS

Working with MP3 ID3 Tags in FTP Server Using PHP
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2010-01-20

    Table of Contents:
  • Working with MP3 ID3 Tags in FTP Server Using PHP
  • Install the GetID3 () application in your web server
  • Uploading the folders
  • Getting Down to ID3 Tag Editing

  •  
     

    SEARCH CODEWALKERS

    Working with MP3 ID3 Tags in FTP Server Using PHP


    (Page 1 of 4 )

    Editing ID3 tags for MP3s -- such as you would find on an online music site, for example -- may seem to be no big deal. If you've ever had to edit lots of them at the same time, however, it's a different story. Fortunately, there's an efficient way to do it that consumes less time and resources than you might fear. Best of all, even a beginner can do it.

    Imagine this: you're running a music website, have uploaded a lot of MP3s, and then one day realized that all or most of your MP3s do not have ID3 tags -- or worse, they have the wrong tags? Of course, one possible, painful approach to solving this problem is to download all of those MP3s again to your local computer, and then edit the ID3 tag using any editor (for example Winamp). When you are done, you'll upload them to the FTP server.

    But uploading a single MP3 can take more than a minute for slower DSL connections; what if you have more than 20, or even hundreds of them? The whole MP3 ID3 tag editing process might take several days!

    This is where a more efficient method is needed to edit MP3 tags right in the FTP server. In this way, you will save a lot of time by downloading and uploading MP3 files just for the sake of editing the ID3 tags. This tutorial has been written to provide the details of how to edit or add ID3 tags to current MP3 files directly in the FTP server. The techniques discussed here can be implemented by a complete beginner at editing ID3 tags using PHP.

    The method and the requirements

    Say for example you have placed your MP3s inside a folder named “mp3forme” located in the root directory of your FTP server. The ideal solution would be to use a server side scripting language such as PHP, and then to use a web form to edit and save the correct ID3 tags. This might seem to be an unusual solution, but an actual PHP application does exist. It is called “getID3 () - The PHP media file parser”: http://getid3.sourceforge.net/  

    The good thing about this application is that it is released as open source, so you can use the application for free, even for commercial mp3 applications. For the purpose of this application, we can limit the scope of the implementation to MP3, though it seems that the getID3 application can read other music file types as well, like WAV. Our scope for the purposes of this tutorial is as follows:

    1. We will use the Apache-Linux environment, since this is the most common hosting configuration today (as of 2010).

    2. This tutorial is written for a real FTP server environment, though the main concepts and principles can be extended to a local host environment supporting Apache and a PHP platform such as XAMPP.

    3. I have tested this tutorial; the methods I describe work in an XAMPP local host using Windows XP.

    4. This tutorial assumes you have a basic knowledge of MP3 ID3 tags, such as editing them using Winamp or other mp3 players capable of editing ID3 tags. If you need more information about ID3 tags, please read this article: http://en.wikipedia.org/wiki/ID3. Below is a screenshot of a sample MP3 ID3 tag viewed in Windows Media Player. To get the properties of the MP3 file, go to: File -> Properties -> Content

     

     

    As you can see, the ID3 tag should have “song title” and “artist name.” Album and composer are not even required; however, “comments” can be important for promotional purposes (such as including the artist's website for example, which can be useful for promoting independent artist). Including the recording company can also be helpful.

    More Miscellaneous Articles
    More By Codex-M

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Attention: Forum and Site Maintenance
    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength

    Developer Shed Affiliates

     



    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap