Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codeconscious/audiotagger
Various ID3 tag–related operations on local audio files
https://github.com/codeconscious/audiotagger
audio csharp dotnet id3v2 id3v2-tag tagging
Last synced: about 1 month ago
JSON representation
Various ID3 tag–related operations on local audio files
- Host: GitHub
- URL: https://github.com/codeconscious/audiotagger
- Owner: codeconscious
- Created: 2021-02-12T12:25:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-10T07:14:12.000Z (6 months ago)
- Last Synced: 2024-08-10T08:28:44.807Z (6 months ago)
- Topics: audio, csharp, dotnet, id3v2, id3v2-tag, tagging
- Language: C#
- Homepage:
- Size: 429 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- project-awesome - codeconscious/audiotagger - Various ID3 tag–related operations on local audio files (C# #)
README
# AudioTagger
A .NET CLI program that can perform the following actions on audio files:
- View ID3v2.3 tags
- Auto-update tags using filename patterns
- Update a single tag for multiple files at once
- Auto-rename and reorganize files using filename patterns
- Reorganize files into folders using their tag data
- Find duplicate files by their tags
- Auto-write genres for registered artists
- Remove artwork
- See media file stats
- Apply audio normalization (ReplayGain)This is a little labor-of-love project that I work on in my spare time. It relies on the [TagLibSharp](https://github.com/mono/taglib-sharp) library for tag reading and writing.
## Requirements
- [.NET 8 runtime](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
## Running
Run this app from the `AudioTagger.Console` folder using `dotnet run`. Passing no arguments will show the instructions.
Additionally, `settings.json` should exist in the application directory for some features. A sparsely populated file will be automatically created if it does not already exist when the program is started.
A sample settings file follows:
```json
{
"artistGenreCsvFilePath": "/Users/me/Documents/audio",
"resetSavedArtistGenres": true,
"renaming": {
"useAlbumDirectories": true,
"ignoredDirectories": [
"Directory 1",
"Directory 2"
],
"patterns": [
"%ALBUMARTISTS% ≡ %ALBUM% [%YEAR%] = %TRACK% - %ARTISTS% - %TITLE%",
"%ARTISTS% - %ALBUM% [%YEAR%] - %TRACK% - %TITLE%",
"%ALBUMARTISTS% ≡ %ARTISTS% - %ALBUM% [%YEAR%] - %TITLE%",
"%ARTISTS% - %ALBUM% [%YEAR%] - %TITLE%",
"%ARTISTS% - %ALBUM% - %TRACK% - %TITLE%",
"%ARTISTS% - %ALBUM% - %TITLE%",
"%ARTISTS% - %TITLE% [%YEAR%]",
"%ARTISTS% - %TITLE%",
"%TITLE%"
]
},
"duplicates": {
"pathSearchFor": "/Users/me/Documents/Media/",
"pathReplaceWith": "",
"savePlaylistDirectory": "/Users/me/Downloads/NewMusic",
"titleReplacements": [
" ",
" ",
"-",
"~",
"〜",
"/",
"/",
"?",
"?",
"!",
"!",
"AlbumVersion",
"AlbumVer",
"ShortVersion",
"ShortVer",
"()",
"()",
"•",
"・",
".",
":",
":"
]
},
"tagging": {
"regexPatterns": [
"(?:(?.+) ≡ )?(?.+?)(?: ?\\[(?\\d{4})\\])? = (?\\d+) [–-] (?.+?) [–-] (?.+)(?=\\.(?:m4a|opus))",
"(?:(?.+) ≡ )?(?.+?)(?: ?\\[(?\\d{4})\\])? = (?\\d{1,3}) [–-] (?.+)(?=\\.(?:m4a|opus))",
"(?:(?.+) ≡ )(?.+?)(?: ?\\[(?\\d{4})\\])? = (?.+?) [–-] (?.+)(?=\\.(?:m4a|opus))",
"(?:(?.+) ≡ )?(?.+?)(?: ?\\[(?\\d{4})\\])? = (?.+)(?=\\.(?:m4a|opus))", ]
}
}
```Explanation of options:
- `titleReplacements`: Optional. Substrings in titles that will be ignored when searching for duplicate files. This allows pairs like "My Song" and "My Song (Single Version)" to be considered identical. Otherwise, they would be considered separate titles.
- `renamePatterns`: Mandatory. When renaming files, they will be renamed according to the first such pattern that matches the populated tags in each file. For example, if a file contains only artist and title information, then it will be renamed per the third option above.
- `regexPatterns`: Mandatory. When tagging files, these regexes are used to match against the filenames. When there is a match, then the appropriate ID3 tags are updated in the file.
- `artistGenres`: Auto-populated when the `-g` option is supplied.