Click or drag to resize

ID3File Class

A lightweight class that performs simple manipulation of ID3 v2.x and v1.x tagged files. The class is not designed for complex tag manipulation, it is intended for use in utilities that need to easily parse the tags in files and return summary information about the offsets, lengths and contents of all important tag and data structures in the file. A more comprehensive ID3 processing library can be found in the NTagLite project.
Inheritance Hierarchy
SystemObject
  Orthogonal.Common.Basic.ID3ID3File

Namespace: Orthogonal.Common.Basic.ID3
Assembly: Orthogonal.Common.Basic (in Orthogonal.Common.Basic.dll) Version: 2024-04-15 18:00 GMT+10.f27da1471008deaf16b803c17e24a5955690aef1
Syntax
C#
public class ID3File

The ID3File type exposes the following members.

Properties
 NameDescription
Public propertyAudioBufferStart Gets a reference to a buffer holding a maximum of 64 leading bytes of the audio data.
Public propertyAudioLength Gets the length of the audio data.
Public propertyAudioOffset Gets the offset of the audio data synch bytes.
Public propertyCreatedTime Gets the created UTC time of the file that was parsed.
Public propertyFileLength Gets the length of the file that was parsed.
Public propertyFrames Gets a reference to an enumerable collection of ID3Frame objects in the file's V2 tag.
Public propertyFullName Gets the full name of the file that was parsed.
Public propertyHeader Gets a reference to the raw V2 header bytes.
Public propertyIsCompressed Gets a flag indicating if the tag is compressed (only the old v2.2 tag support compression).
Public propertyIsExperimental Gets a flag indicating if the V2.3 or v2.4 tag is experimental.
Public propertyIsExtended Gets a flag indicating if the V2.3 or v2.4 tag has an extended header.
Public propertyIsFooterPresent Gets a flag indicating if a V2.4 footer is present.
Public propertyIsUnsynch Gets a flag indicating if the tag is unsynchronised.
Public propertyMajorVersion Gets the major version of the V2 tag.
Public propertyMinorVersion Gets the minor version of the V2 tag.
Public propertyModifiedTime Gets the last modified UTC time of the file that was parsed.
Public propertyPaddingLength Gets the length of the V2 padding.
Public propertyPaddingOffset Gets the offset of the optional V2 padding which is immediately after the last V2 frame.
Public propertyV1Found Gets a flag indicating if a V1 tag was found at the end of the file.
Public propertyV2Found Gets a flag indicating if a V2 tag was found at the start of the file.
Public propertyV2Size Gets an Int32 size of the V2 tag. The size includes all frames and optional following padding. The value is calculated by taking the unsynchronised 7-bit size bytes out of the V2 header and converting them back to an Int32.
Top
Methods
 NameDescription
Public methodDump Dumps a summary of the parsed information as a multi-line string.
Public methodStatic memberParse Parses an ID3 v2.x and V1.x tagged file and extracts important information that defines the offsets and lengths of the headers, frames and data within the file.
Public methodUpdateNormalized Updates the original file that was parsed to create this ID3File instance. The tag, frames, padding and audio data are written with all sizes and offsets guaranteed to be correct according to the ID3 standards.
Public methodUpsertFrame Updates or inserts a frame with raw byte array data. The method can be used to create non text or url frames that have unusual contents. The ID3DataBuilder class can be used to more easily build a buffer out of data segments.
Public methodUpsertTextFrame Updates or inserts a text frame. The id of the frame dictates which format category the frame falls into and what fields it can contain (see id3.org for details). An exception is thrown if the lang or description parameters are specified but the frame format for the id does not support them.
Top
See Also