TagLib: How to disable creating TDAT TIME TYER tags when setting TDRC

359 views Asked by At

I am trying to use TagLib# for sorting some of the tags in my MP3s, as my car audio has problems with content of some tags (irrelevant for showing). Surely i want just sort the tags, not generate new ones or replace existing. In ideal case only sequence of tags in a mp3 file should be changed, so the file size won't change.

Unfortunately i cannot find a way to just move TDRC tag (new definition for recording date): as soon as i set it, TagLib decides to do something for compatibility and generates also TYER aand TDAT tags, and if time is also present in TDRC, then it generates also TIME tag.

Is there a way to disable autogeneration of these tags when setting TDRC? i have tried just copy TDRC as TextInformationFrame, without luck.

I am using latest TagLib, and processing MP3 files with id3v2.3 tags.

1

There are 1 answers

0
PeterCo On BEST ANSWER

You added the information that you use Id3v2.3 with UTF16.

TDRC is officially only available for id3v2.4. If you use it with id3v2.3 you create a tag outside the official standard.

id3.org says for id3v2.4:

TDAT - Date / TIME - Time / TYER - Year
This frame is replaced by the TDRC frame, 'Recording time' [F:4.2.5]

TDRC
The 'Recording time' frame contains a timestamp describing when the audio was recorded. Timestamp format is described in the ID3v2 structure document [ID3v2-strct].


The timestamp fields are based on a subset of ISO 8601. When being as precise as possible the format of a time string is yyyy-MM-ddTHH:mm:ss (year, "-", month, "-", day, "T", hour (out of 24), ":", minutes, ":", seconds), but the precision may be reduced by removing as many time indicators as wanted.
Hence valid timestamps are:
yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss. All time stamps are UTC. For durations, use the slash character as described in 8601, and for multiple non- contiguous dates, use multiple strings, if allowed by the frame definition.