Closed foremtehan closed 2 years ago
I want to override some tags in this mp3 file, WriteTags method return true at the end but when you analyze the file the target field never written:
WriteTags
$getID3 = new getID3; $tagwriter = new getid3_writetags; $tagwriter->filename = './music.mp3'; $tagwriter->overwrite_tags = true; $tagwriter->tag_encoding = 'UTF-8'; $tagwriter->tagformats = array('id3v1'); $TagData = array( 'artist' => array('My Artist'), ); $tagwriter->tag_data = $TagData; if ($tagwriter->WriteTags()){ return true; }else{ throw new \Exception(implode(' : ', $tagwriter->errors)); } ?>
It does not contain "My Artist" when you analyze the file.
(Also) The file already contains id3v1 and id3v2, when you set the tag_encoding to id3v2 it throw this error: Tag format "id3v2" is not allowed on "mp3.mp3" files
tag_encoding
Tag format "id3v2" is not allowed on "mp3.mp3" files
nvm file was corrupted
I want to override some tags in this mp3 file,
WriteTags
method return true at the end but when you analyze the file the target field never written:It does not contain "My Artist" when you analyze the file.
(Also) The file already contains id3v1 and id3v2, when you set the
tag_encoding
to id3v2 it throw this error:Tag format "id3v2" is not allowed on "mp3.mp3" files