Closed q2apro closed 3 years ago
Check both $tagwriter->errors
and $tagwriter->warnings
for useful pointers, if any.
VorbisComment writing is dependent on vorbiscomment
being available to the system:
https://github.com/JamesHeinrich/getID3/blob/master/getid3/write.vorbiscomment.php#L105
$tagwriter->errors
and $tagwriter->warnings
are both empty.
I assume vorbiscomment
is the one used for webm/audio and ogg/audio? Thanks.
And yes, this might be the problem. I still need to install the package (apt-get install -y vorbis-tools
).
That is the problem then, Vorbis Tools needs to be available to the system for writing vorbiscomment
tags. However getID3 should have given you a better warning that that.
I have installed "vorbis-tools" on my server. Trying the getID3 script again, I still only get:
[14-Apr-2021 04:12:27 UTC] Failed to write tags!
in the logs.
What can I do to find the problem?
If I output the $tagwriter
object after init I get:
[14-Apr-2021 04:19:22 UTC] getid3_writetags Object
(
[filename] => /srv/phpIkYGQW
[tagformats] => Array
(
[0] => vorbiscomment
)
[tag_data] => Array
(
[year] => Array
(
[0] => 2021
)
[unique_file_identifier] => Array
(
[ownerid] => user34946@test.de
[data] => e28ea7d088aeff93bb8xxxsdfsfsdfsdxx
)
)
[tag_encoding] => UTF-8
[overwrite_tags] => 1
[remove_other_tags] =>
[id3v2_tag_language] => eng
[id3v2_paddedlength] => 4096
[warnings] => Array
(
)
[errors] => Array
(
)
[ThisFileInfo:getid3_writetags:private] =>
)
Note: As I wrote in the very beginning, the file is posted and thus a temporary file on the filesystem. Might this be related to the issue?
Update:
I did a complete log and can see the error message now!
⚠️ Tag format "vorbiscomment" is not allowed on "webm.A_OPUS" files
I have tried $tagwriter->tagformats = array('id3v2.4');
instead of vorbiscomment
. Then I get:
[error] => Array
(
[0] => EBML parser: ran out of file at offset 15173
)
[warning] => Array
(
[0] => Unhandled audio type "A_OPUS"
)
If it's in a WebM (subset of Matroska) container then I don't think vorbiscomment
is appropriate (that is for ogg
container). getID3 doesn't support writing to Matroska files. Offhand I'm not sure if there's a standalone commandline tool to write comments to WebM/MKV, but I haven't really looked.
I have an issue with webm/ogg audio recordings in the browser that get saved without metadata. See details at https://stackoverflow.com/q/67041475/1066234
I would like to use getID3 to store the metadata with the ogg-file. I tried the the following:
However, I always get "Failed to write tags!".
How can I solve the problem?