1. Course
  2. Binary Files
  3. Read ID3 v1 tags from MP3 file

Read ID3 v1 tags from MP3 file


Last updated: 8/23/2020 Difficulty: Intermediate

Create a C# program that reads ID3 v1 specification tags from an MP3 music file. You should also check if the ID tag corresponds to the TAG characters of version 1.

ID3 specifications apply to any audiovisual file or container. However, audio containers are generally applied mainly. There are three versions of the specification that are compatible. For example, a file can contain tags simultaneously version 1.1 and version 2.0. In this case, the media player must decide which ones are relevant.

ID3 version 1

This first specification is very simple. It consists of attaching a block of fixed size of 128 bytes at the end of the file in question. This block contains the following tags:

  • An identification header with the characters "TAG".
  • Title: 30 characters.
  • Artist: 30 characters.
  • Album: 30 characters.
  • Year: 4 characters.
  • One comment: 30 characters.
  • Genre (musical): a character.

All tags use ASCII characters, except the genre, which is an integer stored in a single byte. The musical genre associated with each byte is predefined in the standard and includes definitions of 80 genres, numbered from 0 to 79. Certain reproduction programs have expanded on their own the defined genres (from number 80).

Input

Output

TAG
Impact Moderato
Nauj Llopir
YouTube Audio Library
1993

:

Solution

Binary Files

1 / 7

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation


Your donations support our work and contribute to the maintenance of the app.

Advertising