ID3v2 Library is a component for use in Win32 and Win64 (9x/ME/2K/XP/Vista/7/8/10), OSX, iOS, Android and Linux software.
Reads and writes ID3v1, Lyrics3v2 and ID3v2.3, ID3v2.4 tags.
NOTE: Old ID3v2.2 tags (with 3 character frame names) are only supported for reading.
- Loading of ID3v1, Lyrics3v2, ID3v2.2, ID3v2.3 and ID3v2.4 tags
- Saving of ID3v1, Lyrics3v2, ID3v2.3 and ID3v2.4 tags
- iTunes compatible reading-writing for WAV (including RF64) and AIFF/AIFC ID3v2 tags
- Support of DSD .dsf and .dff audio files
- Pure Delphi code, no external dependencies
- Supports unsynchronisation
- Supports compression/decompression of frames
- ID3v2 chapters are fully supported
- Access directly all frames as a TMemoryStream (full controll of the frame contents)
- Full unicode support
- Delphi XE2 64bit and OSX, Delphi XE5 iOS and Android, Tokyo Linux compatible
- Lazarus/Free pascal compatible
- Cross platform FireMonkey example included
All 4 string encoding types are read (ASCII format ISO-8859-1, UTF-16 with BOM, UTF-16BE without BOM, UTF-8)
Other tagging libraries:
ID3v2 Library in shareware and commercial software?
The component comes with full source code and can be evaluated freely. If you like it and decide to use it in a freeware, shareware or commercial (or any other money making - advertising, in app. selling, etc.) product one of the licenses is needed.
There is a discount when purchasing ID3v2 Library and MP4 Tag Library and/or APEv2 Library and/or Ogg Vorbis and Opus Tag Library and/or Flac Tag Library and/or WMA Tag Library and/or WAV Tag Library together. Please checkmark the MP4 Tag Library and/or APEv2 Library and/or Ogg Vorbis and Opus Tag Library and/or Flac Tag Library and/or WMA Tag Library and/or WAV Tag Library on the order page when purchasing ID3v2 Library to get the other 6 component at 50% discount.
The unicode functions all support all the 4 encoding modes (ASCII format ISO-8859-1, UTF-16 with BOM, UTF-16BE without BOM, UTF-8) in tags and return (converted to) UTF-16 (native Delphi 2009 and above) strings.
The functions write (native Delphi 2009 and above) UTF-16 with BOM strings to tags.
If you need other encoding modes please contact me.
If you find a file with tags that the library doesn't parse properly also please contact me (firstname.lastname@example.org).
'TID3v2Tag.APICTextEncodingToWrite' can be set to write UTF8, ANSI or unicode (default) APIC descriptions.
'TID3v2Tag.RewriteCoverArts()' can be used with above, to re-set all APIC frame descriptions to the above set mode.
If you want to for example convert ID3v2.3 to ID3v2.4 then set the MajorVersion property to 4, and save the tag. The tag will be written as ID3v2.4.
'CTOC' frames are actually of type 'TID3v2FrameCTOC' and the 'CHAP' frames are 'TID3v2FrameCHAP'. The difference to normal frames is that they can have sub-frames (their field 'SubFrames' holds their sub-frames), to access the 'CTOC' and 'CHAP' frames type-cast them to 'TID3v2FrameCTOC' and 'TID3v2FrameCHAP' respectively.
FrameIndex := ID3v2Tag.FrameExists('CTOC');
if FrameIndex > - 1 then begin
FrameCTOC := ID3v2Tag.Frames[FrameIndex] as TID3v2FrameCTOC;
FrameCTOC.SubFrames.SetUnicodeText('TIT2', 'My new title for this table of contents');
There are 3 helper methods for chapters:
If changes are made to any of the chapter frames 'CTOC' and/or 'CHAP' it is important to call 'SetAllFrameDataStreams()' just before saving the tags to update their sub-frames.
- TID3v2Frames.FindChapterElementID(ChapterElementID: String): Integer;
- TID3v2FrameCTOC.DeleteChapter(ElementID: String): Boolean;
- TID3v2FrameCTOC.AddChapter(ElementID: String): Boolean;
Notes for WAV and AIFF files
If you come across WAV and AIFF files where the ID3v2 tag is at the beginning of the file, ID3v2 Library will read it (as this is the case for MP3 files too) and write the tag at the beginning too.
If you want to write the ID3v2 tag into the file, as this is the prefered mode, use ID3v2RemoveTag() and then the SaveToFile() method. You can check if the tag is at the beginning with property 'Position', will report '0'.