need a guidance to replace bulk mp3 id tags

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    need a guidance to replace bulk mp3 id tags

    i need a help how to bulk replace mp3 id3 tags from getid3 script in a specific folder

    root host specific folder name = mp3 ( all mp3 will store in this folder)

    #2
    You could try and use: https://www.php.net/manual/en/function.scandir.php

    PHP Code:
    <?php

    // store a list of files inside a given folder
    $mp3_files array_diff(scandir('/path/to/mp3/folder'), array('..''.'));

    // loop through each file that was found
    foreach($mp3_files as $file){
        
    // do your bulk replace on file here...
    }

    Comment


      #3
      bro can you send me full php mp3 id edit script.

      mp3 file location is ../system/mp3/

      i want to remove all tags and replace with my own tags

      Comment


        #4
        I don't have a script on hand that can do bulk editing of idv3 tags but it should be relatively easy to create one.

        There seems to be a nice library on GitHub: https://github.com/JamesHeinrich/getID3

        I'll see what I can do.

        Comment


          #5
          ayesham I've attached a sample script that will look inside a `/mp3` folder and replace the idv3 tag. I created this using the library I mentioned above and some sample code that was provided so its a quick and very dirty implementation since I didn't have much time.

          You'll also see the following in index.php

          PHP Code:
          // populate data array
          $tag_data = [
          'title' => ['My Song'],
          'artist' => ['The Artist'],
          'album' => ['Greatest Hits'],
          'year' => ['2004'],
          'genre' => ['Rock'],
          'comment' => ['excellent!'],
          'track' => ['04/16'],
          ]; 
          You can replace those with your own tags. Hope it helps.
          Attached Files

          Comment


            #6
            thanks bro it woks well

            Comment

            Working...
            X