Last updated on March 22, 2021 by Shoaib Khan
Blog Home

Extract RIFF INFO and Metadata of WAV files in C#

Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

RIFF (Resource Interchange File Format) is a file container format for storing data as tagged chunks. It is mainly used to store multimedia like video and audio. The chunk may include information such as the artist, the creation date, and copyright information, etc. This article will be guiding developers to extract metadata and RIFF INFO from the WAV audio files in C#.

The following topics will be covered in the article in brief:

  • .NET API for Managing Metadata
  • Extract Metadata of WAV Files in C#
  • Extract RIFF INFO of WAV Files in C#

.NET API for Managing Metadata

In this article, I will be using GroupDocs.Metadata for .NET API in the C# examples for extracting metadata from WAV files. In addition to the audio WAV files, the API supports adding, removing, updating, and extracting metadata from MP3 files and videos. Furthermore, it supports Microsoft Office and Open Office file formats, eBooks, images, and many other document formats.

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

Extract Metadata of WAV Files in C#

Let’s start with the extraction of the metadata from the WAV files. Follow the steps and the below-mentioned code example for extracting the WAV package metadata properties of WAV files in C#.

  • Load the WAV audio file.
  • Get the WavRootPackage of metadata.
  • Extract the WavPackage from the root package.
  • Now you can access all the properties of WAV audio.

Here is the output of the above code:

Bits per Sample: 16
Block Align: 4
Byte Rate: 176400
Number of Channels: 2
Audio Format: 1
Sample Rate: 44100

Extract RIFF INFO of WAV Files in C#

RIFF INFO of the WAV files can also be extracted in no different way than the extraction of WavPackage properties shown earlier. Using the following steps, you can extract the RIFF INFO of the audio file of WAV file format within your .NET application.

  • Load the WAV audio file.
  • Get the WavRootPackage of metadata.
  • Extract the RiffInfoPackage from the root package.
  • Now access the properties of WAV audio.

The following code example extracts the RIFF INFO package metadata properties of the WAV file in C#.

The following is the output of the above code:

Artist: GroupDocs 
Comment: Sample WAV File
Copyright: 
CreationDate: 2020-12-03
Software: Sound Forge
Engineer: SGEFFNER
Genre: Mystery

Conclusion

In short, it is very easy to take out the metadata and RIFF INFO from the WAV files in C#. After trying the above examples, think about developing your own metadata extractor .NET application like GroupDocs.Metadata App.

There are many more open-source examples available at GitHub Repository. Download the source code and quickly run the examples using the getting started guide. In case of any difficulty, visit the documentation or reach the support team any time on the forum.

See Also

  • Manage EXIF Data of Images in C#
  • Manage EXIF Data of Images in Java

This entry was posted in GroupDocs.Metadata Product Family and tagged Extract Metadata in CSharp, Extract Metadata of WAV file in CSharp, Extract RIFF INFO of WAV in CSharp. .

← Play and Pause Animated GIF and APNG Images in Web Pages using C#
Sign Documents with Digital Certificate 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)