GETID3更新ID3标签,但不会反映文件的元数据

时间:2019-10-28 06:36:24

标签: php wordpress amazon-s3 id3-tag getid3

我正在使用getid3库更新MP3文件的元数据,因此当我更新ID3标签并通过$ get_id3-> analyze(FILE)获取详细信息时,它将显示更新的标签,但是当我手动检查文件属性时显示的是旧版本。我正在使用Amazon S3上传文件。

我正在使用php getid3库更新和读取文件的ID3标签

$mp3_writter = new getid3_writetags;
$mp3_writter->filename       = $localtempfilename;
$mp3_writter->tagformats     = array( 'id3v1', 'id3v2.4');
                    $mp3_writter->overwrite_tags = true;
                    $mp3_writter->encoding   = 'UTF-8';
                    $mp3_writter->tag_encoding = 'UTF-8';
                    $mp3_writter->remove_other_tags = true;
                    $mp3_data['title'][]   = 'title';
                    $mp3_data['artist'][]  = 'User';
                    $mp3_data['year'][]    = date('Y');                    
                    $mp3_data['publisher'][] = 'Publisher';                    
                    $mp3_data['url_user'][] = 'xyz.com';
                    $mp3_writter->tag_data = $mp3_data;
                    $is_write = $mp3_writter->WriteTags();
var_dump($is_write) // return  true.
/*Fetch the file info*/
$getID3_1 = new getID3;
$ThisFileInfo1 = $getID3_1->analyze($localtempfilename);
print_r($ThisFileInfo1); // It shows the updated tags

当我打开该文件的属性时,显示的是旧标签而不是更新的标签。

0 个答案:

没有答案