{"id":13399414,"url":"https://github.com/mono/taglib-sharp","last_synced_at":"2025-05-14T05:10:27.030Z","repository":{"id":986653,"uuid":"791438","full_name":"mono/taglib-sharp","owner":"mono","description":"Library for reading and writing metadata in media files","archived":false,"fork":false,"pushed_at":"2025-03-29T05:13:57.000Z","size":103510,"stargazers_count":1345,"open_issues_count":149,"forks_count":316,"subscribers_count":85,"default_branch":"main","last_synced_at":"2025-04-12T22:17:26.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mono.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-07-22T16:50:54.000Z","updated_at":"2025-04-12T10:15:01.000Z","dependencies_parsed_at":"2025-04-12T22:27:36.229Z","dependency_job_id":null,"html_url":"https://github.com/mono/taglib-sharp","commit_stats":{"total_commits":790,"total_committers":73,"mean_commits":"10.821917808219178","dds":0.7683544303797468,"last_synced_commit":"c853d26fcf831b9c7bf1b1bc7734c2a8690ca163"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono%2Ftaglib-sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono%2Ftaglib-sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono%2Ftaglib-sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mono%2Ftaglib-sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mono","download_url":"https://codeload.github.com/mono/taglib-sharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076849,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:37.480Z","updated_at":"2025-05-14T05:10:22.020Z","avatar_url":"https://github.com/mono.png","language":"C#","readme":"# TagLib#\n\n[![Join the chat at https://gitter.im/mono/taglib-sharp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mono/taglib-sharp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n(aka *Taglib-sharp*) is a .NET platform-independent library (tested on Windows/Linux) for reading and writing\nmetadata in media files, including video, audio, and photo formats.\nThis is a convenient one-stop-shop to present or tag all your media collection, regardless of which format/container\nthese might use. You can read/write the standard or more common tags/properties of a media, or you can also create and\nretrieve your own custom tags.\n\nIt supports the following formats (by file-extensions):\n * **Video:** mkv, ogv, avi, wmv, asf, mp4 (m4p, m4v), mpeg (mpg, mpe, mpv, mpg, m2v)\n * **Audio:** aa, aax, aac, aiff, ape, dsf, flac, m4a, m4b, m4p, mp3, mpc, mpp, ogg, oga, wav, wma, wv, webm\n * **Images:** bmp, gif, jpeg, pbm, pgm, ppm, pnm, pcx, png, tiff, dng, svg\n\nIt is API stable, with only API additions (not changes or removals)\noccuring in the 2.0 series.\n\n\n## Examples\n\n### Read/write metadata from a video\n```C#\nvar tfile = TagLib.File.Create(@\"C:\\My video.avi\");\nstring title = tfile.Tag.Title;\nTimeSpan duration = tfile.Properties.Duration;\nConsole.WriteLine(\"Title: {0}, duration: {1}\", title, duration);\n\n// change title in the file\ntfile.Tag.Title = \"my new title\";\ntfile.Save();\n```\n\n### Read/write metadata from a Audio file\n```C#\nvar tfile = TagLib.File.Create(@\"C:\\My audio.mp3\");\nstring title = tfile.Tag.Title;\nTimeSpan duration = tfile.Properties.Duration;\nConsole.WriteLine(\"Title: {0}, duration: {1}\", title, duration);\n\n// change title in the file\ntfile.Tag.Title = \"my new title\";\ntfile.Save();\n```\n\n### Read/write metadata from an Image\n```C#\nvar tfile = TagLib.File.Create(@\"C:\\My picture.jpg\");\nstring title = tfile.Tag.Title;\nvar tag =  tfile.Tag as TagLib.Image.CombinedImageTag;\nDateTime? snapshot = tag.DateTime;\nConsole.WriteLine(\"Title: {0}, snapshot taken on {1}\", title, snapshot);\n\n// change title in the file\ntfile.Tag.Title = \"my new title\";\ntfile.Save();\n```\n\n### Read/write custom tags from a specific format\n```C#\nvar tfile = TagLib.File.Create(@\"C:\\My song.flac\");\nvar custom = (TagLib.Ogg.XiphComment) tfile.GetTag(TagLib.TagTypes.Xiph);\n\n// Read\nstring [] myfields = custom.GetField(\"MY_TAG\");\nConsole.WriteLine(\"First MY_TAG entry: {0}\", myfields[0]);\n\n// Write\ncustom.SetField(\"MY_TAG\", new string[] { \"value1\", \"value2\" });\ncustom.RemoveField(\"OTHER_FIELD\");\nrgFile.Save();\n```\n\n\n## Website\nTagLib# is available on GitHub: \u003chttps://github.com/mono/taglib-sharp\u003e\n* **Bugs:**     Create an [issue](https://github.com/mono/taglib-sharp/issues)\n* **Chat:**     Join us at [Gitter](https://gitter.im/mono/taglib-sharp)\n* **Git:**      Get the source at \u003cgit://github.com/mono/taglib-sharp.git\u003e\n\n\n## Installation From NuGet\n\nTagLib# is available on NuGet: \u003chttps://www.nuget.org/packages/TagLibSharp\u003e\n\nInstall from package manager:\n\nPM\u003e Install-Package TagLibSharp -Version 2.3.0\n\n\n## Building and Running\n\n### Command Line\n\n#### To Build From Git:\n\n```sh\ngit clone https://github.com/mono/taglib-sharp.git\ncd taglib-sharp\ndotnet build\n```\n\n#### To Test:\n\n```\ndotnet test\n```\n\n### Build in IDE (Visual Studio, Visual Studio for Mac, Rider, etc):\n\nYou can open it in Visual Studio by using TaglibSharp.sln\n\n#### Running regression by using Nunit 3 Test Adapter:\n\n1. Ensure NuGet packages have been restored\n    1. See: \u003chttps://docs.microsoft.com/en-us/nuget/consume-packages/package-restore\u003e\n2. In Visual Studio, go to menu: Tools \u003e Extensions and Updates \u003e Online\n   (In Visual Studio 2019, use Extensions \u003e Manage Extensions)\n3. Search: Nunit 3 Test Adapter\n4. Download and install it\n5. Open from menu: Test \u003e Windows \u003e Test Explorer\n   (In Visual Studio 2019, use Test \u003e Test Explorer)\n6. You can run your tests from this panel (*not* using the \"Start\" button)\n7. You can debug your tests from this panel:\n   1. Double click on a test. Set some breakpoints in the test in the editor panel.\n   2. right-click on the same test, select \"Debug Selected tests\".\n\n#### To test some scenarios and take advantage of the debugger:\n\n1. Make the \"debug\" project the Startup project\n    (Right-click on the project, select: \"Set as StartUp Project\")\n2. Just modify the \"Program.cs\"\n3. Set some breakpoints and hit the \"Start\" button\n\n\n## They also use TagLib#\nNon exhaustive list of projects that use TagLib#:\n* [Lidarr](https://lidarr.audio/)\n* [MediaPortal 2](https://www.team-mediaportal.com/wiki/display/MediaPortal2/MediaPortal+2)\n* [F-Spot](https://en.wikipedia.org/wiki/F-Spot)\n\nAnd you, what do you use TagLib# for? Reply [here](https://github.com/mono/taglib-sharp/issues/120)\n\n## Contributions\n\nTagLib# is free/open source software, released under the LGPL.\nWe welcome contributions!  Please try to match our coding style,\nand include unit tests with any patches.  Patches can be submitted\nby issuing a Pull Request (Git).\n","funding_links":[],"categories":["C# #","C#","Media","媒体","Parsing"],"sub_categories":["GUI - other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono%2Ftaglib-sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmono%2Ftaglib-sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmono%2Ftaglib-sharp/lists"}