FFMPEG tags

Discussion in 'PHP' started by dnsman, Nov 5, 2010.

  1. #1
    How to set id3 tags with php-ffmpeg :confused:
     
    dnsman, Nov 5, 2010 IP
  2. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #2
    you cannot do that with php-ffmpeg. But you can use shell_exec and id3tool if the files are on the same server. ex:

    
    $current_id3_tags = shell_exec("id3tool somesong.mp3");
    echo $current_id3_tags;
    
    $result = shell_exec("id3tool --set-title=\"My song Title\" somesong.mp3");
          //        Sets the title to WORD 
    
    $result = shell_exec("id3tool --set-album=\"The big album\" somesong.mp3");
        //          Sets the album to WORD somesong.mp3");
    
    $result = shell_exec("id3tool --set-artist=\"The only rockstar\" somesong.mp3");
      //            Sets the artist to WORD
    
    $result = shell_exec("id3tool --set-year=2009 somesong.mp3");
    //              Sets the year to YEAR [4 digits]
    
    $result = shell_exec("id3tool --set-note=\"I like this song\" somesong.mp3");
    //              Sets the note to WORD
    
    $result = shell_exec("id3tool--set-genre=2 somesong.mp3");
         //         Sets  the  genre code to INT (the codes can be acquired from the  genre list.)
    
    $result = shell_exec("id3tool --set-genre-word=rock somesong.mp3");
       //           Sets the genre to WORD (given that WORD is from the genre list.)
    
    $result = shell_exec("id3tool  --set-track=1 somesong.mp3");
    
    
    ?>
    
    Code (markup):
     
    shofstetter, Dec 14, 2010 IP