A command-line MP3 Tag Reader and Editor developed in C that reads and edits ID3v2 metadata from MP3 files without using any external libraries.
The project directly parses the binary structure of ID3v2 tags using C file handling concepts, allowing users to view and modify metadata such as Title, Artist, Album, Year, Genre (Content), and Composer.
Display the following ID3v2 tags:
- 🎵 Title
- 🎤 Artist
- 💿 Album
- 📅 Year
- 🎼 Genre (Content)
- ✍️ Composer
Supports editing the following tags:
| Option | Frame ID | Description |
|---|---|---|
-t |
TIT2 | Title |
-a |
TPE1 | Artist |
-A |
TALB | Album |
-y |
TYER | Year |
-m |
TCON | Genre / Content |
-c |
TCOM | Composer |
- Binary file parsing
- ID3v2 metadata processing
- In-place metadata editing
- Big Endian frame size handling
- Dynamic frame traversal
- Command-line interface
- Input validation
- Error handling
- Memory-safe implementation
- Modular code structure
.
├── main.c
├── main.h
├── functions.c
├── read_metadata.c
├── edit_metadata.c
├── display.c
├── sample.mp3
└── README.md
./a.out -v sample.mp3
./a.out -e -t "New Title" sample.mp3
./a.out -e -a "New Artist" sample.mp3
./a.out -e -A "New Album" sample.mp3
./a.out -e -y 2026 sample.mp3
./a.out -e -m "Pop" sample.mp3
./a.out -e -c "New Composer" sample.mp3
./a.out --help
The application validates:
- Invalid command-line arguments
- Unsupported edit options
- Non-MP3 files
- Missing ID3 tags
- Oversized replacement strings
- Invalid user input
- Functions
- Arrays
- Strings
- Structures
- Pointers
- Dynamic Memory Allocation
- Command Line Arguments
- fopen()
- fread()
- fwrite()
- fseek()
- ftell()
- Frame Parsing
- Big Endian Integer Conversion
- Byte-level Data Manipulation
- Structures
- Buffers
- Parsing binary ID3v2 frame structure
- Converting Big Endian frame sizes
- Editing metadata without corrupting adjacent frames
- Handling variable-length metadata safely
- Traversing MP3 frame headers correctly
- Implementing in-place updates
- Preventing buffer overflows
- Validating frame sizes before editing
- Support ID3v2.4
- Add Album Art (APIC) support
- Support UTF-16 encoded tags
- Add command to create missing tags
- Add backup before editing
- Add colored CLI output
- Ubuntu (WSL)
- GCC Compiler
- ID3v2.3 MP3 Files
Yogesh B
Embedded C | C Programmer | Electronics & Communication Engineer
⭐ If you found this project interesting, consider giving it a star!



