ID3V2
MP3RootPackage.ID3V2 property
Gets or sets the ID3v2 metadata tag.
public ID3V2Tag ID3V2 { get; set; }
Property Value
The ID3v2 metadata tag attached to the audio file.
Examples
The code sample shows how to update the ID3v2 tag in an MP3 file.
using (Metadata metadata = new Metadata(Constants.MP3WithID3V2))
{
var root = metadata.GetRootPackage<MP3RootPackage>();
if (root.ID3V2 == null)
{
root.ID3V2 = new ID3V2Tag();
}
root.ID3V2.Album = "test album";
root.ID3V2.Artist = "test artist";
root.ID3V2.Band = "test band";
root.ID3V2.TrackNumber = "1";
root.ID3V2.MusicalKey = "C#";
root.ID3V2.Title = "code sample";
root.ID3V2.Date = "2019";
// ...
metadata.Save(Constants.OutputMp3);
}
See Also
- class ID3V2Tag
- class MP3RootPackage
- namespace GroupDocs.Metadata.Formats.Audio
- assembly GroupDocs.Metadata