- Notifications
You must be signed in to change notification settings - Fork0
LIbrary for reading and writing metadata in media files
License
skyhoshi/taglib-sharp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
(akaTaglib-sharp) is a .NET platform-independent library (tested on Windows/Linux) for reading and writingmetadata in media files, including video, audio, and photo formats.This is a convenient one-stop-shop to present or tag all your media collection, regardless of which format/containerthese might use. You can read/write the standard or more common tags/properties of a media, or you can also create andretrieve your own custom tags.
It supports the following formats (by file-extensions):
- Video: mkv, ogv, avi, wmv, asf, mp4 (m4p, m4v), mpeg (mpg, mpe, mpv, mpg, m2v)
- Audio: aa, aax, aac, aiff, ape, dsf, flac, m4a, m4b, m4p, mp3, mpc, mpp, ogg, oga, wav, wma, wv, webm
- Images: bmp, gif, jpeg, pbm, pgm, ppm, pnm, pcx, png, tiff, dng, svg
It is API stable, with only API additions (not changes or removals)occuring in the 2.0 series.
vartfile=TagLib.File.Create(@"C:\My video.avi");stringtitle=tfile.Tag.Title;TimeSpanduration=tfile.Properties.Duration;Console.WriteLine("Title: {0}, duration: {1}",title,duration);// change title in the filetfile.Tag.Title="my new title";tfile.Save();
vartfile=TagLib.File.Create(@"C:\My audio.mp3");stringtitle=tfile.Tag.Title;TimeSpanduration=tfile.Properties.Duration;Console.WriteLine("Title: {0}, duration: {1}",title,duration);// change title in the filetfile.Tag.Title="my new title";tfile.Save();
vartfile=TagLib.File.Create(@"C:\My picture.jpg");stringtitle=tfile.Tag.Title;vartag=tfile.TagasTagLib.Image.CombinedImageTag;DateTime?snapshot=tag.DateTime;Console.WriteLine("Title: {0}, snapshot taken on {1}",title,snapshot);// change title in the filetfile.Tag.Title="my new title";tfile.Save();
vartfile=TagLib.File.Create(@"C:\My song.flac");varcustom=(TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);// Readstring[]myfields=custom.GetField("MY_TAG");Console.WriteLine("First MY_TAG entry: {0}",myfields[0]);// Writecustom.SetField("MY_TAG",newstring[]{"value1","value2"});custom.RemoveField("OTHER_FIELD");rgFile.Save();
TagLib# is available on GitHub:https://github.com/mono/taglib-sharp
- Bugs: Create anissue
- Chat: Join us atGitter
- Git: Get the source at git://github.com/mono/taglib-sharp.git
TagLib# is available on NuGet:https://www.nuget.org/packages/TagLibSharp
Install from package manager:
PM> Install-Package TagLibSharp -Version 2.2.0
git clone https://github.com/mono/taglib-sharp.gitcd taglib-sharp./autogen.sh&& make
./configure && make
make test
You can build from MonoDevelop using taglib-sharp.sln
You can open it in Visual Studio by using taglib-sharp.sln
- Ensure NuGet packages have been restored
- In Visual Studio, go to menu: Tools > Extensions and Updates > Online(In Visual Studio 2019, use Extensions > Manage Extensions)
- Search: Nunit 3 Test Adapter
- Download and install it
- Open from menu: Test > Windows > Test Explorer(In Visual Studio 2019, use Test > Test Explorer)
- You can run your tests from this panel (not using the "Start" button)
- You can debug your tests from this panel:
- Double click on a test. Set some breakpoints in the test in the editor panel.
- right-click on the same test, select "Debug Selected tests".
- Make the "debug" project the Startup project(Right-click on the project, select: "Set as StartUp Project")
- Just modify the "Program.cs"
- Set some breakpoints and hit the "Start" button
Non exhaustive list of projects that use TagLib#:
And you, what do you use TagLib# for ? Replyhere
TagLib# is free/open source software, released under the LGPL.We welcome contributions! Please try to match our coding style,and include unit tests with any patches. Patches can be submittedby issuing a Pull Request (Git).
About
LIbrary for reading and writing metadata in media files
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- C#100.0%