Last updated on February 11, 2022 by Shoaib Khan
Blog Home

Read MP3 Tags using C# – (ID3, Lyrics, APE)

Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
mp3 - extract its metadata mp3 tags

There are different metadata standards that are used with MP3 files. Various types of data can be stored using different standards. In this article, we will discuss how to read different MP3 tags using C#. Specifically, we will learn to extract ID3v1, ID3v2, Lyrics, and APEv2 metadata tags from the mp3 files within the .NET application.

The following topics are covered below:

  • .NET API to Manage MP3 tags
  • Read MP3 ID3 Tags – ID3v1 & ID3v2
  • Get MP3 Lyrics Tags
  • Retrieve MP3 APEv2 Tags

.NET API for MP3 Tags Editor

GroupDocs.Metadata provides .NET API to automate metadata management of various file formats within .NET applications. The API allows to read, update, add, clean, and remove the metadata for many file formats. We will use this API to deal with metadata tags of MP3 files.

You can download the DLLs or MSI installer from the downloads section or install the API in your .NET application via NuGet.

PM> Install-Package GroupDocs.Metadata

Read MP3 ID3 Tags using C# – ID3v1 & ID3v2

The following steps show how to read the MP3 ID3v1 tags using C#.

  • Load the MP3 file using Metadata class.
  • Retrieve the root package using the GetRootPackage() method.
  • From the root, you can retrieve each of the ID3v1.

The following C# source code reads some of the MP3 ID3v1 tags of the MP3 file.

Similarly, you can extract the ID3v2 tags. The following steps show how to retrieve the MP3 ID3v2 tags using C#.

  • Load the MP3 file using Metadata class.
  • Get the root package.
  • From the root, you can retrieve all the ID3v2 tags like Band, Artist, Composers, etc.
  • For the attached pictures and their details, use the AttachedPictures properties.

The following C# source code example reads some of the MP3 ID3v2 tags and attached pictures details of the MP3 file.

Read MP3 Lyrics Tags in C#

The following steps guide to read the MP3 Lyrics tags using C#.

  • Load the MP3 file using Metadata class.
  • Retrieve the root package.
  • From the root, you can get lyrics tags and its properties like Lyrics, artist, etc.

The following C# code snippet retrieves MP3 lyrics tags and some of its properties from the MP3 file.

Read MP3 APEv2 Tags in C#

The following steps show how we can extract the MP3 APEv2 tags using C#.

  • Load the MP3 file using Metadata class.
  • Retrive the root package using GetRootPackage() method.
  • From the root, you can retrieve all the APEv2 tags like Album, Genre, Copyrights, Language, etc.

The following C# code examples read some of the properties of MP3 APE tags of an MP3 file.

Get a Free API License

You can get a free temporary license to use the API without the evaluation limitations.

Conclusion

To conclude, we learned to extract metadata tags from the MP3 files using C#. We read ID3v1, ID3v2, Lyrics, and APE tags and their properties from the MP3 files. You can learn more about the API from the documentation and contact us for queries via the forum.

See Also

  • Metadata Remover for Documents and Images using C#
  • Extract RIFF INFO and Metadata of WAV files in C#
  • Manage XMP and EXIF Data of HEIF/HEIC Images using C#
  • Manage EXIF Data of Images in C# .NET

This entry was posted in GroupDocs.Metadata Product Family and tagged read ID3 tags, read mp3 lyrics, Read MP3 tags, Read MP3 Tags CSharp. .

← Convert Presentations to Images in Java
Add or Remove Annotations or Markup PDF files using C# →
  • Search

  • Follow Us

    RSS Facebook Twitter YouTube LinkedIn

  • Categories

    • GroupDocs.Total Product Family
      (6)
    • GroupDocs.Viewer Product Family
      (101)
    • GroupDocs.Annotation Product Family
      (72)
    • GroupDocs.Conversion Product Family
      (83)
    • GroupDocs.Comparison Product Family
      (60)
    • GroupDocs.Signature Product Family
      (60)
    • GroupDocs.Assembly Product Family
      (49)
    • GroupDocs.Metadata Product Family
      (70)
    • GroupDocs.Search Product Family
      (45)
    • GroupDocs.Parser Product Family
      (43)
    • GroupDocs.Watermark Product Family
      (36)
    • GroupDocs.Editor Product Family
      (18)
    • GroupDocs.Merger Product Family
      (37)
    • GroupDocs.Redaction Product Family
      (14)
    • GroupDocs.Classification Product Family
      (4)
    • News Release
      (3)